"Function" let
is a special form.
Like Lisp macros, special forms do not follow any particular rule about evaluating arguments or what to return. Each special form has its own such behavior.
Consult the doc of a given special form for the answer (or the implementation, if the doc doesn't tell you). It suffices to use C-h f let
:
let
is a special form inC source code
.
(let VARLIST BODY...)
Bind variables according to
VARLIST
then evalBODY
.The value of the last form in
BODY
is returned.Each element of
VARLIST
is a symbol (which is bound tonil
) or a list(SYMBOL VALUEFORM)
(which bindsSYMBOL
to the value ofVALUEFORM
).All the
VALUEFORM
s are evalled before any symbols are bound.
Emacs often refers in a general way to functions, macros, and special forms as "functions". The predicate that tests this sense of the word "function" is fboundp
:
(fboundp **'let**'let)
returnst
(fboundp 'forward-char)
returnst
What Lisp more specifically calls a "function" is something that can be funcall
ed or apply
ed. The predicate that tests this sense of the word "function" is functionp
:
(functionp **'let**'let)
returnsnil
(functionp 'forward-char)
returnst