LAMBDA(3cl) |
Common Lisp Reference |
LAMBDA(3cl) |
NAME
lambda – description of function, shorthand for function form (symbol and macro)
SYNOPSIS
|
DESCRIPTION
lambda is both a symbol and a macro.
As a symbol, lambda begins a lambda expression, which is a list that can be used in place of a function name in certain contexts to denote a function by directly describing its behavior rather than indirectly by referring to the name of an established function. is attached to the denoted function (if any is actually created) as a documentation string.
As a macro, lambda provides a shorthand notation for a function special form involving a lambda expression such that:
(
lambda
)
(
function
(
lambda
))
#’(
lambda
)
NOTES
The lambda form
((lambda . ) . )
is semantically equivalent to the function form
(funcall #’(lambda . ) . )
The lambda macro could be implemented by:
(defmacro lambda (&whole &rest )
(declare (ignore ))
‘#’,)
EXAMPLES
( funcall ( lambda ( x ) (+ x 3 )) 4 ) 7
SEE ALSO
function(3cl) , documentation(3cl)
AUTHOR and COPYRIGHT
Substantial portions of this page are taken from draft proposed American National Standard for Information Systems—Programming Language—Common Lisp, X3J13/94-101R, Version 15.17R, Fri 12-Aug-1994 6:35pm EDT; no copyright indicated.
Additional clarification and comments by Michael Marking <marking@tatanka.com>, http://www.tatanka.com/software/cl-manpages/; alternatively, https://github.com/wakinyantanka/cl-manpages/. Copyright 2017 Michael Marking as both an original and a derivative work.
Licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
This page last revised Sunday 26 February 2017.