◷ Reading Time: 3 minutes
add

Adds an item to a collection.
|add (item)addRange

Adds all items to a collection.
|addRange (item)insert

Inserts an item into a collection on a specific index.
|insert (index, item)remove

Removes an item from a collection by its reference.
|remove (item)removeAt

Removes an item from a collection by its index.
|removeAt (index)length

Check count
count

Determines the length of a sequence of elements.
|count (localName, predicate)- localName: Optional
- predicate: Optional (must follow localName)
- return: Number (Integer)
Example:
Sample: people |count ()
Result: 4elementAt

Gets an element by index in a collection.
|elementAt (index)peekAt

Gets an element by index in a collection and removes the element from the collection.
|peekAt (index)shuffle

Shuffles a collection using Fisher Yates.
|shuffle ()Example:
Sample: questions |shuffle ()
Returns: shuffled list of questionsreverse

The reverse function is reversing the collection.
|reverse ()Example:
Sample: matrix is [0,1,2,3]
matrix|reverse ()
Result: [3,2,1,0]chunk

The chunk function is dividing the collection into groups by the given number of elements.
|chunk (integer value)- integer value: (Mandatory) how many elements needs to be included in a chunk
Example:
Sample: values := [1,2,3,4,5,6,7,8,9,0]
values|chunk (3)
Result: [1,2,3], [4,5,6], [7,8,9], [0]