Next: , Previous: , Up: Programming Types   [Contents][Index]

2.4.16 Closure Function Type

Closures are function objects produced when turning a function definition into a function value. Closures are used both for byte-compiled Lisp functions as well as for interpreted Lisp functions. Closures can be produced by byte-compiling Lisp code (see Byte Compilation) or simply by evaluating a lambda expression without compiling it, resulting in an interpreted function. Internally, a closure is much like a vector; however, the evaluator handles this data type specially when it appears in a function call. See Closure Function Objects.

The printed representation and read syntax for a byte-code function object is like that for a vector, with an additional ‘#’ before the opening ‘[’. When printed for human consumption, it is printed as a special kind of list with an additional ‘#f’ before the opening ‘(’.