1 unstable release
0.1.2 | Nov 15, 2024 |
---|---|
0.1.1 |
|
0.1.0 |
|
#626 in Rust patterns
181 downloads per month
22KB
703 lines
Easy to use abstinential (slippery), N-peekable and rewindable wrapper over an iterator. (Nightly Rust)
Example:
use slippery_iter::{SlipperyIter, SlipperyIterator, IntoSlipperyIterator};
fn main() {
let a = 0..=10;
let mut b = SlipperyIter::from(a);
println!("{:?}", b.peek_forward());
println!("{:?}", b.peek_forward_many::<8>());
println!("{:?}", b.consume_many::<6, 0>());
println!("{:?}", b.peek_forward());
println!("{:?}", b.peek_forward_many::<8>());
}