Function concatSync

  • Concatenates multiple input sync iterables into a single sync iterable.

    Returns

    A function that accepts an input sync iterable and returns a concatenated sync iterable.

    Example

    const input1 = [1, 2, 3];
    const input2 = [4, 5, 6];
    const concatenatedSyncIterable = concatSync<number>(input2)(input1);

    for (const x of concatenatedSyncIterable) {
    console.log(x); // Logs 1, 2, 3, 4, 5, 6
    }

    Remarks

    Available as concat when imported from peter-piper/sync.

    Type Parameters

    • T

      The type of elements in the input sync iterables.

    Parameters

    • Rest ...iterables: Iterable<T>[]

      The sync iterables to concatenate.

    Returns ((input: Iterable<T>) => Iterable<T>)

      • (input: Iterable<T>): Iterable<T>
      • Parameters

        • input: Iterable<T>

        Returns Iterable<T>

Generated using TypeDoc