Fix for $matrix (Was: "matrix([matrix([" returned with mat_function (Was: Re: Symbolic matrix power))



On 2013-10-29, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> (defun $matrix (&rest rows)

>> But that only matters if an object is being *evaluated* where it
>> shouldn't be. And sure enough, applying the 'matrix' function incorrectly
>> re-evaluates its arguments.

Excellent catch, spot on. However, the current version of $MATRIX is
pretty recent, and it's written as a MFEXPR* because GCL allows only a
small number of arguments -- 63 iirc. So it was easy to bump into
something like matrix([1], [2], ..., [64]) => Lisp error: too many
arguments. For the record: commit 9bcad16b9e.

I suppose all Lisps must have a limit on the number of arguments, but
aside from GCL, the limit is so big that nobody bumped into it. Is there
a way to write $MATRIX which accommodates both a long argument list and
ordinary evaluation?

best

Robert Dodier