Parameters
- arr: T[]
- predicate: (value: T, index: number, array: T[]) => boolean
Returns [falsey: T[], truthy: T[]]
A tuple of [falsey, truthy], where falsey contains all elements for which predicate returned falsey, and truthy contains all elements for which predicate returned truthy.
Partition an array into two arrays based on a predicate.