Well, the flawed function is as follows:
(defun make-matrix (n)
(make-array (n n) :initial-element 0))
I want to use functions like (make-matrix 8) to replace the longer (make-array '(8 8) :initial-element 0), but CLISP says there is a fault in (n n), because n is not a defined function. How do I write this make-matrix function?
You try to use (n n), but that is Lisp syntax for calling a function named n with an argument n. You should invoke make-array like this:
(make-array (list n n) :initial-element 0)
来源:https://stackoverflow.com/questions/19678906/how-to-modify-this-make-matrix-function