Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Last active December 28, 2016 07:09
Show Gist options
  • Save zhouqiang-cl/577da2dfb6cde33a3fb5560ee9bcb437 to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/577da2dfb6cde33a3fb5560ee9bcb437 to your computer and use it in GitHub Desktop.
common lisp 的函数 NCONC
语法
nconc &rest lists => concatenated-list
参数和值
list --- 除了最后一个, 其他的必须为 list, 最后一个可以是任何 object
concatenated-list --- 一个 list
描述
返回一个list, 这个list 连接了所有的list
代码
* (nconc '(A B C) '(D E F) '(G H I) 1)
(A B C D E F G H I . 1)
注:
 这是一个破坏性的函数, 会改变 lists(如果lists 中用变量的话), 除了产生破坏性外,其他效果和 append 一样
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment