Crates.io | iterslide |
lib.rs | iterslide |
version | 1.0.1 |
source | src |
created_at | 2014-11-25 00:20:54.502844 |
updated_at | 2019-02-06 22:31:42.774363 |
description | A "sliding window" iterator. |
homepage | https://github.com/rozbb/rust-iterslide |
repository | https://github.com/rozbb/rust-iterslide |
max_upload_size | |
id | 392 |
size | 7,227 |
This package implements a "sliding window" iterator.
Sample usage:
extern crate iterslide;
use iterslide::SlideIterator;
fn main() {
let v: Vec<i8> = vec![1, 2, 3, 4, 5];
for window in v.slide(3) {
println!("{:?}", window);
}
}
Output:
[1, 2, 3]
[2, 3, 4]
[3, 4, 5]
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.