Sunday, July 6, 2008

What if...

What if there was no lambda in Lisp, but if defun returned the function defined? Wouldn't it be possible to define a macro such as:


(defmacro lambda (args . body)
`(defun ,(gensym) ,args . ,body))


Please excuse the half-Scheme notation.