is the binding form that Donkey directly interprets.
Donkey does not directly support the Scheme binding forms
Local , let , and
let* . letrec
is subsumed by letrec , and
local and let are transformed
into equivalent lambda applications.
let*
(local definitions)(local (defs) body ...)
Syntax:
must be a sequence of definitions, i.e., either definitions of the shapedefswhere(define var exp)is a variable andvaris an arbitrary expression, or of the shapeexp.(define-structure (var1 var2 ...))Semantics: The definitions are evaluated as if they were global except that their scope is only the expression.
Pragmatics:
is the primary tool to organize programs. If some function is only useful as an auxiliary function for some other function, it should be hidden usinglocal. If some sequence of definitions depend on the parameter to a function,localis the feature to be used.local![]()