zip<U> method
Zips this list with other into a list of Pairs.
Stops at the shorter list.
[1,2,3].zip(['a','b','c']) // [(1,'a'),(2,'b'),(3,'c')]
Implementation
List<Pair<T, U>> zip<U>(List<U> other) {
final len = math.min(length, other.length);
return List.generate(len, (i) => Pair(this[i], other[i]));
}