This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
use core::*;
|
||||
|
||||
fn main() {
|
||||
for ["Alice", "Bob", "Carol"].each |&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))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user