Name: Anonymous 2010-01-01 21:49
Holy shit, it's teaching me how to make a Reverse Polish Notation calculator!
(deftype operation () '(member + - * /))
(defun rpn-eval (exp &aux (stack nil))
(dolist (e exp (first stack))
(push
(typecase e
(integer e)
(operation
(let ((v1 #1=(pop stack)) (v2 #1#)) (funcall e v2 v1))))
stack)))
; (rpn-eval '(5 1 2 + 4 * + 3 -)) => 14