
Intro Lisp Notes
1. Touretzky book - available online, there’s a link to it on the course web-
page.
1a. web page resources
2. History Originally developed in the late 50s by John McCarthy.
Equally capable of numeric computation and symbolic computation.
Primarily adopted as an AI language. Also used in AutoCAD, Visio,
Emacs, Yahoo! Store, etc.
ANSI standard developed in 1994 - served to reunite different implemen-
tations.
3. Implementations: clisp, cmucl, allegro.
Using lisp with emacs.
4. Basics of usage: starting the interpreter.
5. Functional programming
a function maps a set of inputs to an output.
No side effects
Can be treated as a black box.
Examples: +, -, *, -, sqrt, abs
6. Predicates.
A predicate is a special type of function.
Predicates map from inputs to true or false
They are used to test conditions, types, equality, etc.
Convention: end with ’p’.
e.g. numberp, symbolp, consp, evenp, oddp, equal
Not - maps non-nil to nil and nil to t.
7. data types
•Numbers
integers
floating point numbers - note on precision in lisp.
ratios, fractions
•Symbols
named after English words
Any combination of letters and numbers.
Serve to represent some non-numeric value.
t and nil - special symbols.
quote.
1