🤸♀️ 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.
Add the crate to Cargo manifest.
sh
cargo add itermore
And bring the extension traits into scope.
rust
use itermore::prelude::*;
Now you can use extension methods like windows
on
any iterator.
rust
for [a, b, c] in iter.windows() {
println!("{} {} {}", a, b, c)
}
// Outputs
// 1 2 3
// 2 3 4
// 3 4 5
This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.