Whether or not it is similar as setq
and setf
? There is no big difference between flet
and labels
?
Sincerely!
In Common Lisp, both flet
and labels
make lexical bindings of slightly different sorts:
flet
is a special form for local function binding. Bindings are not recursive and cannot refer to each other. Each binding contains function name, arguments, and function body.
labels
is a special form for local function binding. Bindings can be recursive and can refer to each other. Each binding contains function name, arguments, and function body.
In Emacs Lisp, there is a small difference. The labels form is like flet, except that it makes lexical bindings of the function names rather than dynamic bindings.