Prelude API
    Preparing search index...

    Function some

    • Returns true if at least one element in the iterable satisfies the predicate.

      Type Parameters

      • T

        The type of elements in the iterable

      Parameters

      • predicate: (value: T, index: number) => boolean

        Function to test each element with its index

      Returns (values: Iterable<T>) => boolean

      True if any element passes the predicate test, false otherwise

      G.pipe(
      [1, 2, 3, 4, 5],
      G.some(x => x > 3)
      ) // true

      G.pipe(
      [1, 2, 3],
      G.some(x => x > 5)
      ) // false