News for hackers. Stuff that matters.
Re:Zig's Curious Multi-Sequence for Loops by chlorion on Monday February 27, 2023 @08:28PM (#34964555)
You can zip a zipper to combine them, but you end up with an item like (a, (b, (c, d))), not a huge deal since it gets destructured automatically.

The itertools crate has a multizip function/macro that allows zipping as many iterators as you'd like without nesting zips inside of zips!

I really recommend checking out itertools if you use rust and like iterators! It's a direct dependency of rustc itself too, which suggests its a trusted project (it may even be maintained by rust devs, not totally sure).

There are no comments on this comment yet.