• Returns a tuple of two arrays, where the first one contains all elements for which the predicate returned true, and the second one contains all elements for which the predicate returned false.

    Type Parameters

    • T

    Parameters

    • arr: readonly T[]
    • predicate: ((elem: T) => boolean)
        • (elem): boolean
        • Parameters

          • elem: T

          Returns boolean

    Returns [T[], T[]]