lambda form expression in function position
A lambda expression in function position compiles just fine:
> ((lambda (n) (> n 10)) 42)
T
Closure built from a lambda in function position
On the other hand:
> (defun greater-than (x)
(lambda (n) (> n x)))
GREATER-THAN
> ((greater-than 10) 42)
Compile-time error: illegal function call
doesn't work.
(I obviously need to call FUNCALL to make it work: (funcall (greater-than 10) 42) => T.
Why this design?
I understand why a SYMBOL with a function object as value binding must not work, e.g.: (let ((foo (lambda () 42))) (foo)). Separate namespaces and all that.
But why prohibit a function object itself in function position? What was the rationale behind this decision?