Iterate several iterables in lockstep.
An iterator which yields successive tuples of values where each value is taken in turn from the provided iterables. It will be as long as the shortest provided iterable.
import { zip } from '@lumino/algorithm';let data1 = [1, 2, 3];let data2 = [4, 5, 6];let stream = zip(data1, data2);Array.from(stream); // [[1, 4], [2, 5], [3, 6]]
Rest
The iterable objects of interest.
Generated using TypeDoc
Iterate several iterables in lockstep.
Returns
An iterator which yields successive tuples of values where each value is taken in turn from the provided iterables. It will be as long as the shortest provided iterable.
Example