Ported scheme code to common lisp. Seems to work fine.