ts-iterable-functions
    Preparing search index...

    Function _zipAll

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

      Type Parameters

      • TT

        Element type produced by each inner iterable.

      Parameters

      • src: Iterable<Iterable<TT, any, any>>

        Iterable yielding the sequences to zip together.

      Returns Iterable<Iterable<TT, any, any>>

      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]]