5 ms·
The itertools crate has you covered: https://docs.rs/itertools/0.7.8/itertools/fn.zip.html https://docs.rs/itertools/0.7.8/itertools/fn.zip.html By the way, t
by danieldk 9y ago
The itertools crate has you covered:
https://docs.rs/itertools/0.7.8/itertools/fn.zip.html https://docs.rs/itertools/0.7.8/itertools/fn.zip.html
By the way, the Iterator's zip function is no magic. You could trivially implement a standalone function using the zip method yourself:
https://docs.rs/itertools/0.7.8/src/itertools/free.rs.html#75-80 https://docs.rs/itertools/0.7.8/src/itertools/free.rs.html#7...
- Rusky 9y agoThere's also UFCS: for (a, b) in Iterator::zip(as, bs) { // ... }