Post by Hayley Sha
Is there a difference (besides the syntactical one) between
#'(lambda (y) (1+ y)) and
(lambda (y) (1+ y))?
In ANSI Lisp, the latter expression denotes a form which, if
presented for evaluation, invokes a lambda macro. The expansion of that
macro is the former expression. The evaluation of *that* expression
calculates the function object.
So, under evaluation, they are equivalent via the macro expansion
of one to the other.
Under processing other than evaluation, they may not be equivalent.
Note that #'(lambda (...) ...) is not a Lambda Expression; it's
an (function ...) expression containing an embedded Lambda Expression.
A situation which requires a Lambda Expression, and doesn't evaluate the
expression, will almost certainly not accept #'(lambda ...).
One example of that is the first position of a compound form,
which is not evaluated, but permits a Lambda Expression.