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 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短