没有值或未绑定 (No Value/Unbound) 没有值或未绑定 (No Value/Unbound) 一个你最常听到 Lisp 的抱怨是一个符号没有值或未绑定。数种不同的问题都用这种方式呈现。 局部变量,如 let 与 defun 设置的那些,只在创建它们的表达式主体里合法。所以要是我们试着在 创建变量的 let 外部引用它, > ...
Variable Basics Variable Basics As in other languages, in Common Lisp variables are named places that can hold a value. However, in Common Lisp, variables aren’t typed the way ...
Defining Your Own Packages Defining Your Own Packages Working in COMMON-LISP-USER is fine for experiments at the REPL, but once you start writing actual programs you’ll want t...
Anonymous Functions Anonymous Functions Once you start writing, or even simply using, functions that accept other functions as arguments, you’re bound to discover that sometime...
Filenames Filenames So far you’ve used strings to represent filenames. However, using strings as filenames ties your code to a particular operating system and file system. Like...
Higher Math Higher Math The functions you’ve seen so far are the beginning of the built-in mathematical functions. Lisp also supports logarithms: **LOG** ; exponentiation: **EX...
The Pretty Printer Backend The Pretty Printer Backend You can start by defining a class with two slots—one to hold an instance of indenting-printer and one to hold the tab wid...
Truth, Falsehood, and Equality(真、假和等价) Truth, Falsehood, and Equality(真、假和等价) Two last bits of basic knowledge you need to get under your belt are Common Lisp’s notion of truth...