/** * Separate elements based on a map function. * * @tsplus static ImmutableArray.Aspects partitionMap * @tsplus pipeable ImmutableArray partitionMap */ export function partitionMap(f: (a: A) => Either) { return (self: ImmutableArray): readonly [ImmutableArray, ImmutableArray] => self.partitionMapWithIndex((_, a) => f(a)) }