Skip to content

Instantly share code, notes, and snippets.

@schmee
Created May 18, 2014 19:52
Show Gist options
  • Save schmee/d419d35cbbbfd7fa21d2 to your computer and use it in GitHub Desktop.
Save schmee/d419d35cbbbfd7fa21d2 to your computer and use it in GitHub Desktop.
let board = [Empty, ..9];
let line = [0, 3, 6];
let get = line.iter().map(|&i| board[i]);
for p in get {
println!("{:?}", p);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment