New local variables may be created and bound to values anywhere a statement may appear, using the let statement.
statement
statement ... )
(let¯ ( var <- val)
Let creates a new local variable var and binds it to a value. The body of the let may change the value of var, but the value of var at the end of the body must match the value that the val expression has at the time the body ends. Otherwise program behavior will be unpredictable thereafter. The val expression is actually evaluated twice, once forwards before the body, to generate the value to bind to var, and once backwards after the body, to uncompute this value.
Actually the current implementation of let does require the value of val and all its subexpressions to remain the same at both the start and end of the body. Future implementations may relax this restriction.
Other forms of the let construct currently exist, but are not currently documented as user-level constructs.