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
语法 | |
make-array dimensions &key element-type initial-element initial-contents adjustable fill-pointer displaced-to displaced-index-offset | |
参数和值 | |
dimensions --- array 的大小和维度的指示符 | |
element-type --- 类型描述符, 默认为 t | |
initial-element --- 一个 object, 每个element 都初始化成这个 | |
initial-contents --- 一个 object, 将 整个数组 初始化成这个。 | |
adjustable --- 一个 generalized boolean, 默认为 nil | |
fill-pointer --- array 的 fill-pointer 或者 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
语法 | |
simple-string-p object => generalized-boolean | |
参数和值 | |
object --- 一个 object | |
generalized-boolean --- 一个 generalized-boolean | |
描述 | |
如果 object 是个 simple-string, 返回 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
语法 | |
get-macro-character char &optional readtable => function, non-terminating-p | |
参数和值 | |
char --- 一个字符 | |
non-terminating-p --- 一个 generalized boolean, 默认为 false | |
readtable --- 一个 readtable 指示符, 默认为当前 readtable | |
function --- nil或者一个有两个参数的函数 | |
new-function --- 一个 函数指示符 |
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
语法 | |
ignore-errors form* => result* | |
参数和值 | |
forms --- 一个隐式的 progn | |
results --- 正常情况下, 是 form 的求值结果, 如果抛出了异常, 则是 nil 和 condition | |
描述 | |
ignore-errors 阻止 error 进入调试器 |
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
语法 | |
class-of object => class | |
参数和值 | |
object --- 一个 object | |
class --- 一个 class object | |
描述 | |
返回 object 的类, 其中object 是这个类的直接实例 |
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
描述 | |
访问器: 通过替一个槽定义一个访问器 (accessor),我们隐式地定义了一个可以引用到槽的函数 | |
缺省值: 指定一个槽的缺省值,可以给入一个 :initform 参数 | |
槽初始化: 想要在 make-instance 调用期间就将槽初始化, 可以用 :initarg 定义一个参数名 | |
代码 | |
* (defclass circle () | |
((radius :accessor circle-radius | |
:initarg :radius | |
:initform 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
语法 | |
typep object type-specifier &optional environment => generalized-boolean | |
参数和值 | |
object --- 一个 object | |
type-specifier --- 一个 type-specifier | |
environment --- 一个 environment object, 默认为 nil | |
generalized-boolean --- 一个 generalized-boolean | |
描述 |
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
语法 | |
special-operator-p symbol => generalized-boolean | |
参数和值 | |
symbol --- 一个符号 | |
generalized-boolean --- 一个 generalized-boolean | |
描述 | |
如果 symbol 是一个特殊操作符, 返回 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
语法 | |
the value-type form => result* | |
参数和值 | |
value-type --- 一个类型标识符 | |
form --- 一个 form | |
results --- 对 form 求值产生的 结果, 这些结果符合 value-type | |
代码 | |
* (the fixnum (+ 5 7)) |
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
描述 | |
如果 lisp 的reader 遇到了宏字符, 那么这个宏字符所关联的宏读取函数将会被调用 | |
并可能会有一个object产生 |