Page 289
backtraces
Backtraces are incredibly useful for debugging. Be aware though that tail-call elimination may have removed some function calls from the stack.
Page 291
unbound variables
Make sure you read the error messages carefully.
- Unbound variable means Lisp thinks the symbol is being used as a variable.
- Undefined function means Lisp thinks the symbol is being used as a function.
Often, you'll see a symbol that you know is defined in an error message. Perhaps though, due to incorrect parenthesization, a function is being used as a variable or vice versa:
? (cond (zerop x) (print 'ok) Error: unbound variable ZEROP ? (let ((x 1) (y 2)) (print (x y))) Error: undefined function X