map3<T, U, V, W> function
A map
function that takes in 3 iterables. The Iterables must be of
equal length.
Implementation
Iterable<V> map3<T, U, V, W>(Iterable<T> ts, Iterable<U> us, Iterable<W> ws,
V Function(T t, U u, W w) func) sync* {
final Iterator<T> itt = ts.iterator;
final Iterator<U> itu = us.iterator;
final Iterator<W> itw = ws.iterator;
while (itu.moveNext() && itt.moveNext() && itw.moveNext()) {
yield func(itt.current, itu.current, itw.current);
}
if (itu.moveNext() || itt.moveNext() || itw.moveNext()) {
throw ArgumentError("Iterables aren't of equal length.");
}
}