0[2] (mapcar #'+ `(22 11 55) `(111 222 333)) (133 233 388) 0[2] (mapcar #'cdr `((22 11 55) (111 222 333))) ((11 55) (222 333)) 0[2] (apply #'append `((22 11 55) (111 222 333))) (22 11 55 111 222 333) 0[2]
mapcar用于以第二个参数为运算符或函数,执行第二个参数,这个函数所需要的参数来自于mapcar的第二个参数到最后一个参数,将后面参数中列表中的每项取出,然后分别运算,形成新的列表,意味着对每个列表中的每项都会执行一次mapcar的第二个参数规定的函数。
apply则以第二个参数为函数或运算符,将后面参数中的列表中的每项取出后,仅做为参数供函数运算,不形成新的列表
0[5] (defun myadd(v1 v2) (mapcar '+ v1 v2)) STYLE-WARNING: redefining COMMON-LISP-USER::MYADD in DEFUN MYADD 0[5] (mapcar `+ `(11 22) `(33 44)) (44 66)
0[5] (apply #'myadd `((11 22) (33 44))) (44 66) 0[5]
assoc相当于一种HASH操作,以参数为关键字,从列表中取出第一项元素,
* (defvar *mystudent* `((1 (liming 25)) (2 (wanghua 26)))) *MYSTUDENT* * *mystudent* ((1 (LIMING 25)) (2 (WANGHUA 26)))
* (assoc `1 *mystudent*) (1 (LIMING 25)) * (assoc `2 *mystudent*) (2 (WANGHUA 26))
注意 在LISP中最好 用TAB来分隔中文参数
* (defvar *mysts* `((男 (李明 29))(女 (王花 26))) ) *MYSTS* * *mysts* ((男 (李明 29)) (女 (王花 26))) * (assoc `男 *mysts*) (男 (李明 29)) * (assoc `女 *mysts*) (女 (王花 26)) * (assoc `男 *mysts*) (男 (李明 29)) *
相关推荐
AutoLisp-教程word版教程.rar
emacs-lisp-intro emacs-lisp-intro
cad-lisp-3-表操作.LSP.lsp
Common-Lisp-Actors, 通用Lisp的actor系统 这是一个简单且易于使用的Actor系统,在。设置需要波尔多螺纹。http://common-lisp.net/project/bordeaux-threads/ 2. 加载 actors.lisp 并开始使用它。 如果你有 Quick
common-lisp-the-language-second-edition.PDF
Autocad的课件——AutoLISP-Visual-LISP教程.ppt
Practical Common Lisp-1st-2005,官方排版,我为大部分章节加了二级书签
lisp--lisp-- 一个可以跑sicp解释器的lisp--。
常见的lisp-jupyter 一个基于Jupyter的Common Lisp内核以及一个用于构建Jupyter内核的库,该库基于Robert Dodier的 ,该库基于Frederic Peschanski的 jupyter。 该文件描述了本地计算机上common-lisp-jupyter的安装...
Lisp-flavoured C
The Elements of Artificial Intelligence Using Lisp - Steven L. Tanimoto.pdf The Elements of Artificial Intelligence Using Lisp - Steven L. Tanimoto.pdf
Arduino-lisp-badge.zip,一种用lisp编程的手持式计算机,带有独立的键盘和显示器。lisp徽章,Arduino是一家开源软硬件公司和制造商社区。Arduino始于21世纪初,深受电子制造商的欢迎,Arduino通过开源系统提供了很多...
On LISP Advanced Techniques for Common LISP - Paul Graham.pdf
通过交互式计算机终端进行实验,以学习编程语言Lisp(LISt处理语言)的Common Lisp方言。
轻描淡写地介绍Lisp,不需要算术就可以拥有任何数学背景。
AutoLISP-应用程序源代码.pdf
资源分类:Python库 所属语言:Python 资源全名:slims-lisp-0.0.5.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
$ npm install --save lisp-to-array 或者,全局安装: $ npm install -g lisp-to-array 用法 io.js / node.js var lispToArray = require ( "lisp-to-array" ) ; console . log ( lispToArray ( "(this is an \...
emacs lisp,emacs lispemacs lispemacs lispemacs lispemacs lispemacs lispemacs lispemacs lispemacs lispemacs lisp
Provides an overview of Common Lisp for the working programmer. Introduces key concepts in an easy-to-read format. Describes format, typical use, and possible drawbacks of all important Lisp ...