Lecture overview -- Keyboard shortcut: 'u'  Previous page: Name binding constructs [Section] -- Keyboard shortcut: 'p'  Next page: The equivalent meaning of <kbd>let</kbd> -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 3 - Page 2 : 42
Functional Programming in Scheme
Name binding, Recursion, Iteration, and Continuations
The let name binding expression

A name binding expression establishes a number of local name bindings in order to ease the evaluation of a body expression

In a name binding construct a number of names are bound to values. The name bindings can be used in the body, which must be an expression when we are working in the functional paradigm. There are a number of variations in the way the names can refer to each other mutually. We will meet some of them on the following pages.


(let ((n1 e1)
      ...
      (nk ek))
  body-expr)

The names n 1 ... n k are bound to the respective values e 1 ... e k , and the body expression is evaluated relative to these name bindings. Free names in the body expression are bound to names defined in the surround of the let construct.

  • Characteristics of a let construct:

    • In body-expr n1 refers to the value of e1, ..., and nk refers to the value of ek

    • Syntactic sugar for an immediate call of a lambda expression

      • To be illustrated on the next page

    • As a consequence, the names are bound simultaneously relative to the name bindings in effect in the context of the let construct.