Skip to content

Instantly share code, notes, and snippets.

@brson
Created September 22, 2012 06:16
Show Gist options
  • Save brson/3765332 to your computer and use it in GitHub Desktop.
Save brson/3765332 to your computer and use it in GitHub Desktop.
rust-lang.org fix
fn main() {
for ["Alice", "Bob", "Carol"].each |name| {
let name = *name;
do task::spawn {
let v = rand::Rng().shuffle([1, 2, 3]);
for v.each |num| {
io::print(fmt!("%s says: '%d'\n", name, *num))
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment