Welshman Docs / @welshman/lib / partition
Function: partition() ​
partition<
T>(f,xs):T[][]
Defined in: packages/lib/src/Tools.ts:552
Splits array into two arrays based on predicate
Type Parameters ​
T ​
T
Parameters ​
f ​
(x) => boolean
Function to test elements
xs ​
T[]
Array to partition
Returns ​
T[][]
Tuple of [matching, non-matching] arrays