Function any

  • Example

    import * as A from "flurp/array";
    import * as N from "flurp/number";

    const hasAPositive = A.any(N.isPositive);
    hasAPositive([3, -5, -6])); // true
    hasAPositive([-3, -5, -6])); // false
    hasAPositive([])); // false

    Type Parameters

    • T

    Parameters

    • condition: ((x: T) => boolean)
        • (x: T): boolean
        • Parameters

          • x: T

          Returns boolean

    Returns ((arr: readonly T[]) => boolean)

      • (arr: readonly T[]): boolean
      • Parameters

        • arr: readonly T[]

        Returns boolean