私はLispが初めてで、機能に問題があります:
(setf (symbol-function 'reduce-our)
#'(lambda(new-expression)
(setf expression nil)
(loop while (not (equal new-expression expression)) do
(setf expression new-expression)
(setf new-expression (reduce-once-our expression))
(if (not (equal 'new-expression 'expression))
(format t " ==> ~A Further reductions are impossible.~%"
new-expression)
new-expression))))
(reduce-our '(^ x => x))
これは次のエラーです:
Error: The value ^ is not of the expected type NUMBER.
LISP が入力リストを while ループで評価しようとしていると思っていたのですが、
(not (equal nil '(^ x => x)))
正常に動作し、関数が同じチェックを行うと確信しています。そう。このエラーが発生する場所と理由がわかりません。