Lisp 附加无法正常工作 [英] Lisp Append Not Working Properly
本文介绍了Lisp 附加无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将一个简单的元素附加到 lisp 列表中.
Hi I am trying append a simple element to a lisp list.
(append queue1 (pop stack1))
我认为上面的代码会将 stack1 的第一个元素附加到 queue1.queue1
是否需要非零?谢谢.
I thought the above code would append the first element of stack1 to queue1. Does queue1
need to be non nil? Thanks.
推荐答案
Append returns 连接的列表(queue1
与 stack1
的第一个元素> 附加).它不会修改 queue1.
Append returns the concatenated list (queue1
with the first element of stack1
appended). It does not modify queue1.
append 的破坏性等价物是 nconc:它就地"附加到列表中.
The destructive equivalent of append is nconc: this appends to the list "in place."
这篇关于Lisp 附加无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文