• Partitions a list into two lists - one for which the supplied partitioner returns true (the left list), and the other, the right list, for which the supplied partitioner does not return true.

    Type Parameters

    • T
    • A
    • B

    Parameters

    • l: ArrayLike<T>

      List to partition

    • partitioner: ((candidate) => boolean)

      Function to use to partition the list.

        • (candidate): boolean
        • Parameters

          • candidate: T

          Returns boolean

    Returns {
        left: A[];
        right: B[];
    }

    • left: A[]
    • right: B[]