[|
Factor handbook » The language » Lexical variables

Prev::>
Next:Lexical variables in literals


Vocabulary
syntax

Syntax
[| bindings... | body... ]


Word description
A literal quotation with named variable bindings. When the quotation is called, it will take values off the datastack and place them into the bindings from left to right. The body may then refer to these bindings. The quotation may also bind to named variables in an enclosing scope to create a closure.

Examples
See Examples of lexical variables.

Definition