Skip to content

Rust library: bidirectional iterators

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

sbillig/bidir_iter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bidrectional iterators

Build Status Documentation

use bidir_iter::*;

let a: &[i64] = &[1, 2, 3];
let mut iter = a.bidir_iter();

assert_eq!(iter.next(), Some(&1));
assert_eq!(iter.next(), Some(&2));
assert_eq!(iter.next(), Some(&3));
assert_eq!(iter.prev(), Some(&2));
assert_eq!(iter.prev(), Some(&1));
assert_eq!(iter.prev(), None);
assert_eq!(iter.next(), Some(&1));

About

Rust library: bidirectional iterators

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages