Pclump:
Filter:
Classes | Streams-Patterns-Events > Patterns > List

Pclump : FilterPattern : Pattern : AbstractFunction : Object

A pattern that takes another pattern and groups its values into arrays.
Subclasses: Pflatten

Description

Groups the source pattern into arrays whose size is given by n. Similar to SequenceableCollection: -clump.

E.g. If the source pattern has 5 elements and you choose a clump size of 2, the new pattern will return two arrays containing 2 elements and a final array containing 1 element.

Class Methods

Pclump.new(n, pattern)

Arguments:

n

An integer, or a pattern that returns an integer. This integer will determine the size of the next clump.

pattern

The pattern to be filtered.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.embedInStream(event)

.n

.n = value

Examples

Play some random chords: