zipWith<B, C> method
Join elements at the same index from two different Iterable into
one Iterable containing the result of calling combine
on
each element pair.
If one input Iterable is shorter, excess elements of the longer Iterable are discarded.
Implementation
Iterable<C> zipWith<B, C>(
C Function(T t, B b) combine,
Iterable<B> iterable,
) sync* {
var it = iterator;
var otherIt = iterable.iterator;
while (it.moveNext() && otherIt.moveNext()) {
yield combine(it.current, otherIt.current);
}
}