zip<B> method
Implementation
IList<Tuple2<A, B>> zip<B>(IList<B> bs) {
final IList<Tuple2<A, B>> abNil = nil();
if (!(_isCons() && bs._isCons())) {
return abNil;
} else {
final IList<Tuple2<A, B>> result = new Cons(tuple2(this._unsafeHead(), bs._unsafeHead()), abNil);
var thisCurrent = this._unsafeTail();
var bsCurrent = bs._unsafeTail();
var resultCurrent = result;
while(thisCurrent._isCons() && bsCurrent._isCons()) {
final next = new Cons(tuple2(thisCurrent._unsafeHead(), bsCurrent._unsafeHead()), abNil);
resultCurrent._unsafeSetTail(next);
resultCurrent = next;
thisCurrent = thisCurrent._unsafeTail();
bsCurrent = bsCurrent._unsafeTail();
}
return result;
}
}