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
语法 | |
symbol-value symbol => value | |
(setf (symbol-value symbol) new-value) | |
参数和值 | |
symbol --- 一个 symbol ,这个 symbol 必须有值 | |
value, new-value --- 一个 object | |
描述 | |
存取 symbol 的 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
描述 | |
/ 是 最近的一个values的 list, // 是倒数第二个values的 list, /// 是倒数第三个values的list | |
代码 | |
* (values 'a1 'a2) | |
A1 | |
A2 | |
* / | |
(A1 A2) |
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
描述 | |
* 的值是最近的 primary value, ** 是再之前的的 primary value, *** 是倒数第三次的 primary value | |
代码 | |
* (values 'a1 'a2) | |
A1 | |
A2 | |
* 'b | |
B |
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
描述 | |
+ --- 前一条被求值 form | |
++ --- + 之前的一条被求值的 form, 即倒数第二条被求值的 form | |
+++ --- ++ 之前的一条被求值的 form, 即倒数第三条被求值的 form | |
代码 | |
* (print 1) | |
1 | |
1 |
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
语法(这个set函数已过时) | |
set symbol value => value | |
参数和值 | |
symbol --- 一个 symbol | |
value --- 一个 object | |
描述 | |
set 给 symbol 的内容赋值为 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
语法 | |
last list &optional n => tail | |
参数和值 | |
list --- 一个 list | |
n --- 一个正整数, 默认为1 | |
tail --- 一个 object | |
描述 | |
last 返回最后的n 个 conses, 如果 list 为空, 则返回空 |
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
语法 | |
nconc &rest lists => concatenated-list | |
参数和值 | |
list --- 除了最后一个, 其他的必须为 list, 最后一个可以是任何 object | |
concatenated-list --- 一个 list | |
描述 | |
返回一个list, 这个list 连接了所有的list |
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
语法 | |
null object => boolean | |
参数和值 | |
object --- 一个 object | |
boolean --- 一个 boolean | |
描述 | |
如果 object 是一个空 list, 返回 T, 否则返回 nil |
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
语法 | |
endp list => generalized-boolean | |
参数和值 | |
list --- 一个 list | |
generalized-boolean --- 通用型 boolean | |
描述 | |
如果 list 为空, 则返回 true, 否则返回 false |
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
描述 | |
common lisp 的访问器在很多地方存在 | |
如获取元素和列表的car,cdr | |
获取属性的get | |
获取位置的first, second... |