Generic Collectors:
Filter:
Overviews | Language | Common methods

Generic Collectors

Methods that incrementally build up collections from nothing

You can see which classes implement a specific method by clicking on the method name.

There are a number of methods that incrementally build up (or reduce down) collections like arrays or events. Nil responds by creating a collection, so that variables do not need to be initialized. Nil is just the "ground" (default case) from which the rest is bootstrapped.

add

Returns an array with the value. This makes it unnecessary to initialize when adding to a variable.

addAll

Returns an array with all the values. This makes it unnecessary to initialize when adding to a variable.

remove

For nil, it just returns nil. This makes it unnecessary to initialize when removing from a variable and adding to it again.

++

Returns an array with all the values. This makes it unnecessary to initialize when adding to a variable.

NOTE: Note that, unlike with addAll, the second operand must be a collection in order to function in this way.

addFunc

Returns a function or a FunctionList. This method is used to add multiple functions to already existing ones.

removeFunc

This method is used to remove multiple functions from already existing ones. For Nil, it just returns itself.

transformEvent

This method is used to operate on events which are passed through the system as an argument.