/** * Separate elements based on a predicate. * * @tsplus static ImmutableArray.Aspects partition * @tsplus pipeable ImmutableArray partition */ export function partition(f: Predicate) { return (self: ImmutableArray): readonly [ImmutableArray, ImmutableArray] => self.partitionWithIndex((_, a) => f(a)) }