The Little Schemer

[美] Daniel P. Friedman

出版时间

2017-07-01

ISBN

9787121317255

评分

★★★★★

标签

编程

书籍介绍
这不是一本教你写程序的书,而是一场精心设计的对话——作者用一问一答的方式,牵着读者的手,把递归这一计算的核心机制一点点逼出来。它真正的价值不在于让你学会 Scheme,而在于重塑你对
作者简介
Daniel P. Friedman,是美国印第安那大学计算机科学系的教授。Matthias Felleisen是美国莱斯大学计算机科学系的教授。同时,他们使用Scheme来教授计算及编程课程的经验超过了25年,发表了100多篇论文,出版了3部Scheme相关书籍。
AI导读
核心看点
  • 一问一答引导式教学,无理论堆砌
  • 深入解析递归、CPS及Y组合子
  • 通过Scheme揭示计算的本质规律
读者共识
  • 经典之作,阅读体验极佳且意犹未尽
  • 对递归和函数式编程有深刻启发
  • 翻译一般,有条件建议直接读原文
精彩摘录
  • "... (and ...) 和 (or ...) 都不能被定义成像 (cond ...) 那样的功能, 尽管(and ...) 和 (or ...) 可以通过 (cond ...)表达式的方式表示出来:"
  • "Scheme(或 Lisp) 中的 pair, 其两个元素是含义不同但相关的对象."
  • "从现在开始, 我们将使用等宽字体来表述一个原子."
  • "The Five Rules The Law of Car: the primitive car is defined only for non-empty lists The Law of Cdr: the primitive cdr is defined only for non-empty lists.The cdr of any non-empty list is always another list. The Law of Cons: The primitive cons takes two arguments. The second argument to cons must b"
  • "The First Commandment: Always ask null? as the first question in expressing any function. The Second Commandment: Use cons to build lists. The Third Commandment: When building a list, describe the first typical element,and then cons is onto the natural recursion. The Fourth Commandment: Always chang"
  • "First: When recurring on a list of atomes, lat, ask two questions about it: (null? lat) and else. When recurring on a number, n, ask two questions about it: (zero? n) and else. Second: When building a value with +,always use 0 fro the value of the terminating line, for adding 0 does not change the v"
  • "When recurring on a list of S-expressions, l, ask three question about it: (null? l), (atom? (car l)), and else. Simplify only after the function correct."
  • "The First Commandment (preliminery) Always ask null? as the first question in expressing any function."
目录
第1章 玩具总动员 2
第2章 处理,处理,反复处理…… 14
第3章 用cons构筑恢宏 32
第4章 数字游戏 58
第5章 我的天!都是星星 80

显示全部
用户评论
程序接受数据并产生数据。程序设计需要彻底理解数据;好的程序会反映出所处理数据的结构。大多数的数据集合,并由此延伸到大多数程序,都是可递归表示的。递归是依据自身定义对象或解决问题的方法。递归是S的天然计算机制;主要的S编程任务是创建递归定义。用S递归地编写程序本质上是简单的模式识别
一个递归怎么能整出 Y combinator 和 closure 这么变态的东西 = =
很有趣的教学方式。递归不像顺序结构好理解,这本书是不错的练习
2020年2月29日16:07:32开始读
开开眼界。 第九章的Y组合子、第十章的简易编译器只是大致看了看,理解的不够透彻,了解程度。scheme调试太费劲了,不折腾了。
可能读过SICP后,看的价值就没那么大了
启发式的写作方式很新颖也很易读,方便初学者入门,但是缺乏深度和范式,对于有oo功底的程序员更想看到fp的形式化表述吧。
对递归的解析大开眼界。
书的风格比起现在的书来说还是很奇特的。中文版刚出的时候买的(感谢翻译),现在只记得书里介绍过 Y-Combinator 和停机问题了。再让我看一次的话,我可能已经不愿意再烧脑一次了……
中文版意外地翻译得不错
下载
收藏