Skip to content

Instantly share code, notes, and snippets.

@koraa
Created December 23, 2018 13:20
Show Gist options
  • Save koraa/4100ff55871d8f0453bb712ddc7946ec to your computer and use it in GitHub Desktop.
Save koraa/4100ff55871d8f0453bb712ddc7946ec to your computer and use it in GitHub Desktop.
fn main() {
let mut r = vec![1,2,3];
let mut it = r.iter();
println!("{:?}", it.next());
println!("{:?}", it.next_back());
println!("{:?}", it.next());
println!("{:?}", it.next());
}
// OUTPUT:
// Some(1)
// Some(3)
// Some(2)
// None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment