ts-iterable-functions
    Preparing search index...

    Function _prepend

    • Prepends a single item ahead of all elements produced by the source iterable.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • src: Iterable<T>

        Source iterable that will be prefixed with item when enumerated.

      • item: T

        Element yielded before any value from the source iterable.

      Returns Iterable<T>

      A deferred iterable that first yields item and then every element from src.

      const values = [..._prepend([2, 3], 1)];
      console.log(values); // [1, 2, 3]

      or using the curried version:

      const values = [
      ...pipeInto(
      [2, 3],
      prepend(1)
      ),
      ];
      console.log(values); // [1, 2, 3]