Splits array into two arrays based on predicate

  • Type Parameters

    • T

    Parameters

    • f: (x: T) => boolean

      Function to test elements

    • xs: T[]

      Array to partition

    Returns T[][]

    Tuple of [matching, non-matching] arrays