Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Created December 4, 2016 10:25
Show Gist options
  • Save zhouqiang-cl/1a082e7809264b15488e6869033cb028 to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/1a082e7809264b15488e6869033cb028 to your computer and use it in GitHub Desktop.
common lisp 的函数 LAST
语法
last list &optional n => tail
参数和值
list --- 一个 list
n --- 一个正整数, 默认为1
tail --- 一个 object
描述
last 返回最后的n 个 conses, 如果 list 为空, 则返回空
代码
* (last '(a b c) 1)
(C)
* (last '(a b c) 3)
(A B C)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment