jcubic
jcubic

Reputation: 66650

Self executing lambda expression in Common Lisp

I thought that this is the only way to write self executing lambda expression in Common LISP:

(funcall #'(lambda (x) (format t "~S" x)) 10)

but it seems that this also work in CLISP on GNU/Linux:

((lambda (x) (format t "~S" x)) 10)

which is more like you do this in Scheme. Is this something that is correct according to Common LISP spec? Does other CL implementation also work this way.

Upvotes: 0

Views: 201

Answers (1)

Rainer Joswig
Rainer Joswig

Reputation: 139401

That's standard Common Lisp syntax.

See lambda forms in Conses as Forms.

Upvotes: 6

Related Questions