Code from the book On Lisp, by Paul Graham.