Expand description
🤸♀️ More iterator adaptors.
This crate provides some useful iterator adaptors like
chunks and windows. Unlike
itertools this crate provides a separate
extension trait for each adaptor. Additionally, each type of adaptor is
feature flagged so you only have to compile the features you need.
Getting started
Add the crate to Cargo manifest.
cargo add itermoreAnd bring the extension traits into scope.
use itermore::prelude::*;Now you can use extension methods like windows on
any iterator.
for [a, b, c] in iter.windows() {
println!("{} {} {}", a, b, c)
}
// Outputs
// 1 2 3
// 2 3 4
// 3 4 5Modules
Re-exports all iterator extension traits.
Structs
An iterator over
N elements of the iterator at a time.An iterator over all contiguous windows of length
N.