Re: macro for looping over functions in a list
Posted: Thu Dec 23, 2010 1:27 pm
So what's wrong with the following code?
Code: Select all
(defconstant +Functions+ '(1+ 1-))
(defun compile-Function (Function)
`((let ((val (funcall ,Function 4)))
(if (>= val 0)
val
(return-From evaluate -100)))))
(defun compile-Functions (Functions)
`(defun evaluate ()
(+ ,@(loop for Function from Functions
append (compile-Function Function)))))