Alan Kay说,仔细阅读代码并找到Lisp 1.5手册第13页代码中唯一的错误,帮助他更好地理解计算机科学100倍.
有问题的代码是eval&的第一个版本,apply它看起来像现代的lisp(我知道).
既然正确的答案可能已知但丢失了(我的google-fu很不错,我至少搜索了20分钟)我将奖励第一个正确的答案(我将查看编辑时间,所以不要试图作弊)尽快获得250点赏金.
我会建议其他人也为赏金做出贡献,记得上面的视频Alan Kay说这些东西让人回想起爱因斯坦在发现相对论时所处的环境.
文本中的代码用M-Expressions编写.我正在翻译从M表达式转换为S表达式(lisp代码)@ https://github.com/Viruliant/MccarthyMCEval-1.5.
无论如何这里是第13页的翻译引用:
;______________________________________Lisp Meta-Circular Evaluator S-Expression
;this code is written in the order it appears on pages 10-13 in the Lisp 1.5 Manual
;and is translated from the m-expressions into s-expressions
(label mc.equal (lambda (x y)
(mc.cond
((atom x) ((mc.cond ((atom y) (eq x y)) ((quote t) (quote f)))))
((equal (car x)(car y)) (equal (cdr x) (cdr y)))
((quote …Run Code Online (Sandbox Code Playgroud)