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 婆婆高寿祝福语大全简短