• Returns all items in an array that meet the predicate, or the fallback if list is null or undefined.

    Type Parameters

    • T

    Parameters

    • fallback: T[]

    Returns ((fn) => ((list) => T[]))

      • (fn): ((list) => T[])
      • Parameters

        Returns ((list) => T[])

          • (list): T[]
          • Parameters

            • list: T[]

            Returns T[]

    Example

    filter([])(isOdd)([3, 6, 9])
    // => [3, 9]

    filter([])(isOdd)(undefined)
    // => []

Generated using TypeDoc