7 releases (2 stable)
Uses old Rust 2015
1.0.1 | Feb 6, 2019 |
---|---|
1.0.0 | Aug 17, 2017 |
0.0.5 | May 24, 2015 |
0.0.4 | Jan 3, 2015 |
0.0.2 | Nov 25, 2014 |
#946 in Algorithms
332 downloads per month
Used in adjacent_lines
6KB
78 lines
rust-iterslide
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]
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Contribution
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.