Next: , Previous: Top Level, Up: Binding Constructs  
[Contents][Index]  6.12.2 Local Variable Bindings  As opposed to
definitions at the top level, which creates bindings that are
visible to all code in a module, it is also possible to define
variables which are only visible in a well-defined part of the
program. Normally, this part of a program will be a procedure or
a subexpression of a procedure.  With the constructs for local
binding (let, let*, letrec, and letrec*), the Scheme language
has a block structure like most other programming languages
since the days of ALGOL 60. Readers familiar to languages like C
or Java should already be used to this concept, but the family
of let expressions has a few properties which are well worth
knowing.  The most basic local binding construct is let.
syntax: let bindings body  bindings has the form  ((variable1
init1) …)   A let expression is evaluated as follows.   The
other binding constructs are variations on the same theme:
making new values, binding them to vari