Lisp,利弊和(数字.数字)差 [英] Lisp, cons and (number . number) difference
本文介绍了Lisp,利弊和(数字.数字)差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
两者之间有什么区别
(cons 2 3)
和
'(2 . 3)
在Lisp中?
推荐答案
'(2 . 3)
是点对.
(cons 2 3)
也会创建一个虚线对.因此,这些应该评估相同的结果.
(cons 2 3)
creates a dotted pair too. So these should evaluate to the same thing.
所以一个是点对的文字,另一个是点对.
So one is a literal for a dotted pair, the other one creates a dotted pair.
这篇关于Lisp,利弊和(数字.数字)差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文