# local

`(`local` (DEFINITION ...) EXPRESSION)`

The `local` expression is used to group together related definitions. Each definition in the `local` is evaluated in order, and finally the body expression is evaluated. Only the expressions within the `local` (including the right-hand-sides of the definitions and the body) may refer to the names defined by the local. If a name defined in the `local` is the same as a top-level binding, the inner one "shadows" the outer one. That is, inside the local, any references to that name refer to the inner one.

Since `local` is an expression and may occur anywhere an expression may occur, it introduces the notion of lexical scope. Expressions within the local may "escape" the scope of the local, but these expressions may still refer to the bindings established by the local.

Advanced Student Language