ts-iterable-functions
    Preparing search index...

    Function appendConst

    • Appends a single item to the end of the source iterable and returns a lazy iterable including the new item.

      Curried version of _append.

      Type Parameters

      • T

        Element type produced by the source iterable and the appended value.

      Parameters

      • item: T

        Value appended as the final element of the resulting iterable.

      Returns (src: Iterable) => Iterable

      A deferred iterable yielding the original sequence followed by the appended item.

      const result = _append([1, 2], 3);
      console.log([...result]); // [1, 2, 3]

      or using the curried version:

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