Prelude API
    Preparing search index...
    • Creates a transformer that prepends values from an iterable before the original async iterable.

      Type Parameters

      • T
      • U

      Parameters

      • prependValues: Iterable<U, any, any> | AsyncIterable<U, any, any>

        Values to yield before the original iterable's values

      Returns (values: AsyncIterable<T>) => AsyncGenerator<T | U>

      A transformer that yields the prepended values followed by the original values

      This function first yields all values from the prepend iterable, and then yields all values from the original iterable. It's the counterpart to append.

      const result = await G.pipe(
      G.ofIterable([3, 4, 5]),
      G.prepend([1, 2]),
      G.array
      ); // [1, 2, 3, 4, 5]