A closure is a stateful procedure which receives some values, does some work using those value, and returns one or more values. New closures are typically defined either by compiling an Acorn source program or from loading a shared library containing types defined using the C API.

Class Properties (see Type)

New
[getmeth, setmeth, var1, var2, ...] -> closure

Create a new closure, establishing the two methods and the initial values for closure variables

Traits

[]
[...] -> values

Get or set the values of the closure's state (closure variables).

getmethod
Get or set the 'get' method for the closure
setmethod
Get or set the 'set' method for the closure
size
Get the number of values in the closure's state