lambda


(lambda  ( [argList]  [ / varsList ] )  expr  expr  ... )

This function defines a Lambda function, using argList as list of arguments, varsList as list of local variables, and expr is a sequence of 1 or more Lisp expressions (the function body).

Arguments

argList  a list of symbol names, used as arguments passed when this lambda is called

varsList  list of symbol names for the local variables

expr  a sequence of Lisp expressions

Return

the value of the last evaluated expression

Example

(apply '(lambda ( x y ) (* x y))) '(5 20))
100
(mapcar '(lambda (x) (* x 5))  '(1 2 3 4 5.0))
(5 10 15 20 25.0)

Remarks

a LAMBDA function is an "unnamed defun", see defun function, often used with mapcar and apply



©  Bricsys NV. All rights reserved.