ts-iterable-functions
    Preparing search index...

    Function zipAllConst

    • Zips an iterable of iterables into grouped iterables containing elements that share the same index.

      Curried version of _zipAll.

      Type Parameters

      • TT

        Element type produced by each inner iterable.

      Returns (src: Iterable) => Iterable

      A deferred iterable whose elements are iterables of co-indexed values.

      Error Rethrows any error thrown while enumerating the source sequences.

      const sequences = [
      [1, 2, 3],
      ["a", "b", "c"],
      ];
      const grouped = Array.from(_zipAll(sequences), (group) => [...group]);
      console.log(grouped); // [[1, "a"], [2, "b"], [3, "c"]]

      or using the curried version:

      const grouped = Array.from(
      pipeInto(
      [
      [1, 2, 3],
      ["a", "b", "c"],
      [true, false, true],
      ],
      zipAll()
      ),
      (group) => [...group]
      );
      console.log(grouped);
      // [[1, "a", true], [2, "b", false], [3, "c", true]]