File: local.html

package info (click to toggle)
drscheme 1%3A352-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 71,608 kB
  • ctags: 55,284
  • sloc: ansic: 278,966; cpp: 63,318; sh: 32,265; lisp: 14,530; asm: 7,327; makefile: 4,846; pascal: 4,363; perl: 2,920; java: 1,632; yacc: 755; lex: 258; sed: 93; xml: 12
file content (1 line) | stat: -rw-r--r-- 1,356 bytes parent folder | download | duplicates (2)
1
<html><head><title>local</title><h1>local</h1></head><body><code class="scheme">(<code class="scheme"><span class="keyword">local</span></code> (<b>DEFINITION</b> ...) <b>EXPRESSION</b>)</code><br /> <p>The <code class="scheme"><span class="keyword">local</span></code> expression is used to group together related definitions. Each definition in the <code class="scheme"><span class="keyword">local</span></code> is evaluated in order, and finally the body expression is evaluated. Only the expressions within the <code class="scheme"><span class="keyword">local</span></code> (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 <code class="scheme"><span class="keyword">local</span></code> 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.</p> <p>Since <code class="scheme"><span class="keyword">local</span></code> 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.</p> <br /><p><a href="index.htm">Intermediate Student with Lambda Language</a></p></body></html>