sbclとclispを使用した次の単純なプログラムで異なる結果が得られる理由を誰かが説明できますか?私がしていることは言語によって定義されていないのですか、それとも2つのLispインタープリターの1つが間違っていますか?
; Modify the car of the passed-in list
(defun modify (a) (setf (car a) 123))
; Create a list and print car before and after calling modify
(defun testit () (let ((a '(0)))
(print (car a))
(modify a)
(print (car a))))
(testit)
SBCL(バージョン1.0.51)は以下を生成します:
0
0
CLISP(バージョン2.49)は(私が期待するもの)を生成します:
0
123