Prelude API
    Preparing search index...

    Function reverse

    • Yields values from an iterable in reversed order. Note: This operation requires materializing the entire iterable into an array first.

      Type Parameters

      • T

        Element type

      Parameters

      • values: Iterable<T>

        The input iterable

      Returns Generator<T, void, unknown>

      Elements of the input iterable in reverse order

      G.pipe(
      G.range(1, 5),
      G.reverse,
      G.array
      ) // [5, 4, 3, 2, 1]