Lisp 入门教程(刘鑫最新翻译) Common LISP Hints Geoffrey J. Gordon Friday, February 5, 1993 Modified by Bruno Haible 简体中文版翻译: 刘鑫 Note: This tutorial introduction to Common Lisp was written for the CMU environment, so some of the details of running lisp toward the end may differ from site to site. 注意:这份 Common Lisp 入门教程是针对 CMU 环境编写,所以在其它环境运行 LISP 时可能会有细节上的区别。 Further Information 附: The best LISP textbook I know of is Guy L. Steele Jr. _Common LISP: the Language_. Digital Press. 1984. 据我所知最好的 Lisp 书籍是: Guy L. Steele Jr. _Common LISP: the Language_. Digital Press. 1984. The first edition is easier to read; the second describes a more recent standard. (The differences between the two standards shouldn't affect casual programmers.) 第一版很容易阅读,第二版介绍了更新的标准。(两个标准的差异很 小,对于粗 心的程序员没有什么区别。) A book by Dave Touretsky has also been recommended to me, although I haven't read it, so I can't say anything about it. 我还记得 Dave Touretsky 写了一本,不过我从来没读过,所以不能对那本书 发表评论。 Symbols 符号 A symbol is just a string of characters. There are restrictions on what you can include in a symbol and what the first character can be, but as long as you stick to letters, digits, and hyphens, you'll be safe. (Except that if you use only digits and possibly an initial hyphen, LISP will think you typed an integer rather than a symbol.) Some examples of symbols: 符号仅仅是字符串。你可以在符号中包含字母、数字、连接符等等,唯一的限制就是要以字母开头。(如果你只输入数字,最多再以一个连接符开头的话,LISP会认为你输入了一个整数而不是符号。)例如: a b c1 foo bar baaz-quux-gar...