Prelude API
    Preparing search index...

    Function skipWhile

    • Returns a generator that skips elements as long as they satisfy the predicate, then yields all remaining elements.

      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>) => Generator<T>

      Elements after the first element that fails the predicate test

      G.pipe(
      [1, 2, 3, 4, 1, 2],
      G.skipWhile(x => x < 3),
      G.array
      ) // [3, 4, 1, 2]