Function Subspace :: sus :: iter :: zip

auto zip(IntoIteratorAny auto&& iia, IntoIteratorAny auto&& iib) -> Iterator<Tuple<sus::iter::IntoIteratorOutputType<decltype(iia)>::Item, sus::iter::IntoIteratorOutputType<decltype(iib)>::Item>> auto
requires
sus::mem::IsMoveRef<decltype(iia)>
sus::mem::IsMoveRef<decltype(iib)>

Converts the arguments to iterators and zips them.

See the documentation of [Iterator::zip](sus::iter::IteratorBase::zip) for more.

Example

auto a = sus::Array<i32, 2>(2, 3);
auto b = sus::Array<f32, 5>(3.f, 4.f, 5.f, 6.f, 7.f);
auto it = sus::iter::zip(::sus::move(a), ::sus::move(b));
sus_check(it.next() == sus::some(sus::tuple(2, 3.f)));
sus_check(it.next() == sus::some(sus::tuple(3, 4.f)));
sus_check(it.next() == sus::none());