common-lisp引用和自求值对象
示例
请注意,许多数据类型不需要引用,因为它们自己求值。QUOTE对符号和列表特别有用,可防止以Lisp形式进行求值。
不需要引用其他数据类型以防止求值的示例:字符串,数字,字符,CLOS对象,...
这是一个字符串示例。评估结果是字符串,无论它们是否在源中被引用。
> (let ((some-string-1 "this is a string")
(some-string-2 '"this is a string with a quote in the source")
(some-string-3 (quote "this is another string with a quote in the source")))
(list some-string-1 some-string-2 some-string-3))
("this is a string"
"this is a string with a quote in the source"
"this is another string with a quote in the source")因此,为对象报价是可选的。
热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短