副标题: Advanced Techniques for Common LISP
作者: Paul Graham
出版社: Prentice Hall
出版年: 09 September, 1993
页数: 432
定价: $52.00
装帧: paperback
ISBN: 9780130305527
作者: Paul Graham
出版社: Prentice Hall
出版年: 09 September, 1993
页数: 432
定价: $52.00
装帧: paperback
ISBN: 9780130305527
内容简介 · · · · · ·
On Lisp is a comprehensive study of advanced Lisp techniques, with bottom-up programming as the unifying theme. It gives the first complete description of macros and macro applications. The book also covers important subjects related to bottom-up programming, including functional programming, rapid prototyping, interactive development, and embedded languages. The final chapter ... (展开全部)
On Lisp is a comprehensive study of advanced Lisp techniques, with bottom-up programming as the unifying theme. It gives the first complete description of macros and macro applications. The book also covers important subjects related to bottom-up programming, including functional programming, rapid prototyping, interactive development, and embedded languages. The final chapter takes a deeper look at object-oriented programming than previous Lisp books, showing the step-by-step construction of a working model of the Common Lisp Object System (CLOS).
As well as an indispensable reference, On Lisp is a source of software. Its examples form a library of functions and macros that readers will be able to use in their own Lisp programs.
As well as an indispensable reference, On Lisp is a source of software. Its examples form a library of functions and macros that readers will be able to use in their own Lisp programs.
豆瓣成员常用的标签(共49个) · · · · · ·
喜欢读"On Lisp"的人也喜欢 · · · · · ·
按有用程度 按页码先后 最新笔记
-
第69页
撒旦先生 (-_-||)
(defun lrec (rec &optional base) (labels ((self (lst) (if (null lst) (if (functionp base) (funcall base) base) (funcall rec (car lst) #'(lambda () (self (cdr lst))))))) (lrec #'(lambda (x f) (1+ (funcall f))) 0) (lrec #'(lambda (x f) (... (更多)(defun lrec (rec &optional base) (labels ((self (lst) (if (null lst) (if (functionp base) (funcall base) base) (funcall rec (car lst) #'(lambda () (self (cdr lst)))))))
(lrec #'(lambda (x f) (1+ (funcall f))) 0)
看不懂,自己推导一下大概样子:(defun lrec1 (op lst base join) (if (null lst) base (funcall join (funcall op (car lst)) (lrec1 op (cdr lst) base join))))可以把 lst 抽出来:(defun lrec2 (op base join) (labels ((self (lst) (if (null lst) base (funcall join (funcall op (car lst)) (funcall (lrec2 op base join) (cdr lst)))))) #'self))------->(defun lrec2 (op base join) (labels ((self (lst) (if (null lst) base (funcall join (funcall op (car lst)) (funcall self (cdr lst)))))) #'self))op和join是宏的话,就不行了,所以把op和join放到一个函数里在传入:函数的样子是这样的 (lambda (x) (join (op x) (self (cdr lst))))(self (cdr lst))由调用者传给它最后就是这样子的 (lambda (x f) (join (op x) (funcall f)))(defun lrec4 (rec base) (labels ((self (lst) (if (null lst) base (funcall rec (car lst) #'(lambda () (self rec (cdr lst))))))) (收起)(lrec #'(lambda (x f) (and (oddp x) (funcall f))) t)
2011-11-26 11:18:51 回应
-
第17页
在 cl 中, 采用的是 lexically scope, 所以在函数定义的时候, 函数的名字除了绑定这个函数,还绑定了函数中定义的 free varibale, 这样一堆东西放在一起,叫做 closure. 闭包. free 的反义词是 bound. free 的变量, 它的值是不一定的. bound 的变量的值, 是确定的. closures are functions with local state. (更多)在 cl 中, 采用的是 lexically scope, 所以在函数定义的时候, 函数的名字除了绑定这个函数,还绑定了函数中定义的 free varibale, 这样一堆东西放在一起,叫做 closure. 闭包.free 的反义词是 bound.free 的变量, 它的值是不一定的. bound 的变量的值, 是确定的.closures are functions with local state. (收起)2011-05-31 22:31:51 回应
-
第69页
撒旦先生 (-_-||)
(defun lrec (rec &optional base) (labels ((self (lst) (if (null lst) (if (functionp base) (funcall base) base) (funcall rec (car lst) #'(lambda () (self (cdr lst))))))) (lrec #'(lambda (x f) (1+ (funcall f))) 0) (lrec #'(lambda (x f) (... (更多)(defun lrec (rec &optional base) (labels ((self (lst) (if (null lst) (if (functionp base) (funcall base) base) (funcall rec (car lst) #'(lambda () (self (cdr lst)))))))
(lrec #'(lambda (x f) (1+ (funcall f))) 0)
看不懂,自己推导一下大概样子:(defun lrec1 (op lst base join) (if (null lst) base (funcall join (funcall op (car lst)) (lrec1 op (cdr lst) base join))))可以把 lst 抽出来:(defun lrec2 (op base join) (labels ((self (lst) (if (null lst) base (funcall join (funcall op (car lst)) (funcall (lrec2 op base join) (cdr lst)))))) #'self))------->(defun lrec2 (op base join) (labels ((self (lst) (if (null lst) base (funcall join (funcall op (car lst)) (funcall self (cdr lst)))))) #'self))op和join是宏的话,就不行了,所以把op和join放到一个函数里在传入:函数的样子是这样的 (lambda (x) (join (op x) (self (cdr lst))))(self (cdr lst))由调用者传给它最后就是这样子的 (lambda (x f) (join (op x) (funcall f)))(defun lrec4 (rec base) (labels ((self (lst) (if (null lst) base (funcall rec (car lst) #'(lambda () (self rec (cdr lst))))))) (收起)(lrec #'(lambda (x f) (and (oddp x) (funcall f))) t)
2011-11-26 11:18:51 回应
-
第17页
在 cl 中, 采用的是 lexically scope, 所以在函数定义的时候, 函数的名字除了绑定这个函数,还绑定了函数中定义的 free varibale, 这样一堆东西放在一起,叫做 closure. 闭包. free 的反义词是 bound. free 的变量, 它的值是不一定的. bound 的变量的值, 是确定的. closures are functions with local state. (更多)在 cl 中, 采用的是 lexically scope, 所以在函数定义的时候, 函数的名字除了绑定这个函数,还绑定了函数中定义的 free varibale, 这样一堆东西放在一起,叫做 closure. 闭包.free 的反义词是 bound.free 的变量, 它的值是不一定的. bound 的变量的值, 是确定的.closures are functions with local state. (收起)2011-05-31 22:31:51 回应
书评 · · · · · · 我来评论这本书
热门评论 最新评论
非常好的Lisp书
-
- RONGE KUTA(热爱自由,乐于分享) 我承认我是看了 Paul Graham 的“黑客与画家”后中了Lisp的毒。 本来在看SICP时,只纯当Lisp是一门教学语言,现在完全觉得这门语言神奇的令人着迷,想象一下在纠结的前缀式和层层括号下,是程序语言的本质结构,让我们根本不用去纠结琐碎的语法(让语法细节见鬼去吧~~),正如Paul Graham所说的,Li...... (8回应)2011-05-30 3/3有用
"On Lisp"的论坛 · · · · · ·
| 网上有中文版 | 来自Barret | 8 回应 | 2011-10-24 |
| Lisp是一种思维的体操 | 来自AlbertLee | 7 回应 | 2010-09-19 |
以下豆列推荐 · · · · · · (全部)
- 通向Lisp之路 (fzwudc)
- 拓展编程视界系列 (AlbertLee)
- Lisp书不要钱 (哗呀哩呜)
- 程序员必读经典书籍 (Felven)
- 理论计算机科学——程序设计语言 (网络流)
谁读这本书?
喜欢这本书的人常去的小组 · · · · · ·

- LISP (2015)

- Haskell (889)

- Emacs (2344)

- scheme (446)

- TextMate (664)

- 智城Taskcity—软件项目外... (569)

- 豆瓣同城Android (658)

- λ 学院 (1893)
喜欢这本书的人关注的活动 · · · · · ·
订阅关于On Lisp的评论:
feed: rss 2.0











