A question for the #lisp folx:
What, if anything, is the difference between #'(lambda ...) and just plain (lambda ...)?
They seem functionally equivalent to me.
A question for the #lisp folx:
What, if anything, is the difference between #'(lambda ...) and just plain (lambda ...)?
They seem functionally equivalent to me.
royae
in reply to Jonathan Lamothe • • •(lambda ...) is just a macro call that expand in the other form.
From the common lisp spec :
Dave Tenny
in reply to Jonathan Lamothe • • •Holger
in reply to Jonathan Lamothe • • •Pascal Costanza
in reply to Jonathan Lamothe • • •Svante
in reply to Jonathan Lamothe • • •Seemingly plain (lambda () ...) is a macro that expands to (function (lambda () ...)). #'(lambda () ...) uses a reader macro to expand to the same (function (lambda () ...)).
clhs.lisp.se/Body/m_lambda.htm
Function is a special operator that returns a function. It takes either a function name or a lambda expression. The second case is what is happening here.
clhs.lisp.se/Body/s_fn.htm#fun…
A lambda expression is a list of the symbol lambda, a lambda list, and a body.
clhs.lisp.se/Body/26_glo_l.htm…
CLHS: Macro LAMBDA
clhs.lisp.se