Name

lambda

Usage

special-form

Syntax

(lambda (arg*) form*)

Description

The special form lambda and the reader macro #(...) define anonymous functions.

user 1 > (lambda (x y) (+ x y))
it: #<Lambda Name="">
user 2 > (it 21 34)
it: 55
user 3 > #(+ %1 %2)
it: #<Lambda Name="">
user 4 > (it 21 34)
it: 55
user 5 > (defun adder (n) #(+ n %1))
it: adder
user 6 > (def g (adder 2))
it: g
user 7 > (g 3)
it: 5

See also

about:parameters defun defun* lambda lambda*