labels
labels(
l_bindings
[ g_body ]
)
=> g_result
Description
Enables you to define local functions with LET semantics.
labels is similar to the flet function except that in labels, the scope of name bindings for the functions defined by labels encompasses the function body as well as the function definitions themselves.
labels can only be used in Scheme mode.
Arguments
|
A list of variables or a list of the form (s_variable g_value). |
|
Value Returned
Examples
(labels ((sum (x)
(if (plusp x)
x + (sum (sub1 x))
0)))
(sum 10))
=> 55
Related Topics
Function and Program Structure
Return to top