在 SBCL 中,这将分配'bar
给foo
,并带有警告:
* (setf foo 'bar)
; in: SETF FOO
; (SETF FOO 'BAR)
; ==>
; (SETQ FOO 'BAR)
;
; caught WARNING:
; undefined variable: COMMON-LISP-USER::FOO
;
; compilation unit finished
; Undefined variable:
; FOO
; caught 1 WARNING condition
BAR
*
Run Code Online (Sandbox Code Playgroud)
以下来自图雷茨基。我将其输入“7.29.lisp”并保存。
(setf database
’((b1 shape brick)
(b1 color green)
(b1 size small)
(b1 supported-by b2)
(b1 supported-by b3)
(b2 shape brick)
(b2 color red)
(b2 size small)
(b2 supports b1) …
Run Code Online (Sandbox Code Playgroud)