Tuple type describing the elements produced by each input iterable.
Iterable providing the iterables to zip.
A deferred iterable yielding tuples of aligned elements.
const sources: Iterablified<[number, string]> = [
[1, 2, 3],
["a", "b", "c"],
];
const pairs = Array.from(_zipAllToTuple(sources));
console.log(pairs); // [[1, "a"], [2, "b"], [3, "c"]]
or using the curried version:
const pairs = Array.from(
pipeInto(
[
[1, 2],
["x", "y"],
] as Iterablified<[number, string]>,
zipAllToTuple()
)
);
console.log(pairs); // [[1, "x"], [2, "y"]]
Zips multiple iterables into tuples containing the co-indexed elements from each source.