array module reference
array module reference
Utilities for dealing with arrays.
index
- Concatenate Arrays.
- Index into an array.
- Get the first element from an array.
- Insert a new value into an array.
- Apply an function to each value in an array.
- Prepend a new value at the start of an array.
- Remove a value from an Array.
- Update a value in an array.
- Get the size of an array.
- Get everything except the first element from an array.
details
- Concatenate Arrays.
(concat arr1 arr2 [arr3…]) - Index into an array.
(get array i)Get the value at index
i(starting at 0).ihas to be a constant expression. - Get the first element from an array.
(head array) - Insert a new value into an array.
(insert array i val)Insert
valintoarrayati, moving other values back if necessary.ihas to be a constant expression. This is a pure op, so at most one ofarrayandvalmay be a !-stream. - Apply an function to each value in an array.
(map array fn)Invokes
fnonce for each element inarrayand returns an array of the results.fnmust take one argument and return the same type consistently. - Prepend a new value at the start of an array.
(prepend array val)Prepend
valtoarrayat index0, moving other values back.This is a pure op, so at most one of
arrayandvalmay be a !-stream. - Remove a value from an Array.
(remove array i)Removes the value at index
ifromarray.ihas to be a constant expression. - Update a value in an array.
(set array i val)Set the value for
itoval.ihas to be a constant expression. This is a pure op, so at most one ofarrayandvalmay be a !-stream. - Get the size of an array.
(size array) - Get everything except the first element from an array.
(tail array)