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
语法 | |
merge-pathnames pathname &optional default-pathname default-version | |
make-pathname &key host device directory name type version defaults case | |
pathname-directory pathname &key case => directory | |
参数和值 | |
pathname --- 路径名 | |
default-pathname --- 默认的pathname, 是 *default-pathname-defaults* 的值(这个值一般是运行路径) | |
default-version --- pathname 的 version, 默认是 :newest | |
pathname-directory --- 获取 pathname 的目录路径 |
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
语法 | |
random limit &optional random-state => random-number | |
make-random-state &optional state => new-state | |
参数和值 | |
limit --- 一个正整数或者一个正的浮点数 | |
random-state --- 随机状态, 默认为当前的随机状态 | |
描述 | |
random 生成一个随机数. random-state 如果相同,limit 不变的情况下, 会生成同样的随机数 |
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
语法 | |
incf place [delta-form] => new-value | |
decf place [delta-form] => new-value | |
参数和值 | |
place --- 可以简单的认为是一个对象 | |
delta-form --- 一个 delta 的 form | |
delta --- 一个数字 | |
new-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
语法 | |
gcd &rest integers => greatest-common-denominator | |
参数和值 | |
integer --- 整数 | |
greatest-common-denominator --- 一个非负整数 | |
描述 | |
获取 integers 的最大公约数 |
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
语法 | |
exp number => result | |
expt base-number power-number => result | |
参数和值 | |
number --- 一个数字 | |
base-number --- 底数 | |
power-number --- 指数 | |
描述 |
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
语法 | |
setf {pair}* => result* | |
psetf {pair}* => nil | |
pair::= place newvalue | |
变量和值 | |
place --- 占位符 | |
newvalue --- 新值 | |
描述 |
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
语法 | |
progv symbols values form* => result* | |
参数和值 | |
symbols --- 一个 symbols 列表, 这个列表会被求值 | |
values --- 一个对象列表, 这个列表会被求值 | |
forms --- 隐式 progn | |
results --- forms 的值 | |
描述 |
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
终端io并不是简单的输入输出那么简单,它可以控制调制解调器, 打印机 | |
或其他的字符设备等 | |
终端io主要工作在以下三种模式中 | |
1.默认模式. 终端设备驱动程序一次返回一行(在shell中默认就是这种状态).特殊字符也会被输入到设备中(如^C) | |
2.原始模式(raw state). 终端设备驱动程序一次返回一个字符,特殊字符不会被输入到设备中去,(vi 用的就是这种模式处理输入和输出(如vi的快捷键等)) | |
3.cbreak 模式. 和 raw state 模式差不多, 但特殊字符也会输入到设备中去, 同时对于特殊字符的处理是抛出特殊的信号 |
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
语法 | |
%foo | |
描述 | |
% 指示 foo 为一个底层, 快速, 危险的函数或者是lisp 底层实现的 foo 的函数 |
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 内部对这些关键字做一些特殊的操作, 对这些操作符的参数的解析不一样 | |