Name

lambda

Usage

special-form

Syntax

(lambda (arg*) form*)

Description

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

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

See also

about:parameters defun defun* lambda lambda*