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 婆婆66岁祝福语简短
13 今天孩子高考祝福语简短
14 送彩票生日祝福语简短
15 分别祝福语简短情话英文
16 画室揭牌仪式祝福语简短
17 女友妈妈生日祝福语简短
18 离别赠言离职祝福语简短