partition
partition<
A>(predicate): (data) => readonly [readonlyA[], readonlyA[]]
Defined in: Data/Arr.ts:198
Splits an array into two groups based on a predicate. First group contains elements that satisfy the predicate, second group contains the rest.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(a) => boolean
Returns
Section titled “Returns”(data) => readonly [readonly A[], readonly A[]]