Pswitch:
Filter:
Classes | Streams-Patterns-Events > Patterns > List > Indexing

Pswitch : Pattern : AbstractFunction : Object

embed values in a list according to a pattern of indices
Subclasses: Pswitch1

Class Methods

Pswitch.new(list, which: 0)

Pswitch chooses elements from the list by a stream of indices ( which ) and embeds them in the stream. If the element is itself a pattern, it first completely embeds it before looking for the next index.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.embedInStream(inval)

.list

.list = value

.which

.which = value

Examples