Created
December 7, 2016 11:58
-
-
Save zhouqiang-cl/2c577c2af0e94f5acd321fd189a08084 to your computer and use it in GitHub Desktop.
common lisp 的宏 NTH-VALUE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
nth-value n form => object | |
参数和值 | |
n --- 一个非负整数 | |
form --- 一个 form | |
object --- 一个 object | |
描述 | |
nth-value 首先对 n 求值, 然后对 form 求值. 返回 form 的第 n 个值。如果 n 大于等于 form 的值的个数, 则返回 nil | |
代码 | |
* (nth-value 0 (values 'a 'b)) | |
A | |
* (nth-value 1 (values 'a 'b)) | |
B | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment