Created
September 22, 2012 06:16
-
-
Save brson/3765332 to your computer and use it in GitHub Desktop.
rust-lang.org fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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