6.6 Free or Bound Variables
A variable in an expression in any programming language can appear either (1) bound to a declaration and, therefore, a value, or (2) free, meaning unbound to a declaration and, thus, a denotation or value. The qualification of a variable as free or bound is defined as follows (Friedman, Wand, and Haynes 2001, Definition 1.3.2, p. 29):
A variable v occurs free in an expression e if and only if there is a reference to v within e that is not bound by any declaration of v within e.
Avariable v occurs bound in an expression e if and only if there is a reference to v within e that is bound by some declaration of v in e.
For instance, in the expression , the x in the body of the lambda expression occurs bound to the declaration ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access