class_name ZipIterator extends Iterator

var iter1: Iterator
var iter2: Iterator

func _init(a: Iterator, b: Iterator) -> void:
    iter1 = a
    iter2 = b

func next() -> Option:
    match [iter1.next(), iter2.next()]:
        [var a, var b] when a.is_some() and b.is_some():
            return Option.some(Tuple.new([a.unwrap(), b.unwrap()]))
        _: return Option.none
