a list (lambda () (print :foo)) is not code:
CL-USER 10 > (let ((l '(lambda () (print :foo))))
(funcall l))
Error: Argument to apply/funcall is not a function: (LAMBDA NIL (PRINT :FOO)).
But the unquoted lambda form is code, since Common Lisp has a LAMBDA macro CL-USER 13 > (let ((l (lambda () (print :foo))))
(funcall l))
:FOO
:FOO
The LAMBDA macro transforms it into a FUNCTION special form with an embedded lambda expression: CL-USER 14 > (macroexpand-1 '(lambda () (print :foo)))
(FUNCTION (LAMBDA NIL (PRINT :FOO)))
Thus in Common Lisp we can evaluate:a) the special form FUNCTION:
(FUNCTION (LAMBDA () (PRINT :FOO)))
b) the same, but using #' as a short version: #'(LAMBDA () (PRINT :FOO))
c) or the macro LAMBDA, which expands into a) (LAMBDA () (PRINT :FOO))