Array Operations
Length, filtering, mapping, searching, grouping and ordering
| Function | What it does |
|---|---|
all | Check if all elements match predicate |
any | Check if any element matches predicate |
concat | The two arrays joined end to end |
count | How many elements the predicate holds for |
filter | Filter array by predicate |
find | The first matching element, or nil |
findIndex | The position of the first matching element, or -1 |
findLast | The last matching element, or nil |
first | The first element, or nil when the array is empty |
flatten | Nested arrays flattened into one |
groupBy | Groups elements into a map keyed by the expression |
last | The last element, or nil when the array is empty |
len | Array or string length |
map | Transform each element |
none | True when the predicate holds for no element |
one | True when the predicate holds for exactly one element |
reduce | Folds the elements into one value; the running total is #acc and the element is # |
sort | The elements in ascending order |
sortBy | The elements ordered by the expression |
take | The first count elements |