Closed
Description
The front page example doesn't compile. http://www.rust-lang.org/
chris@chris-linux-desktop:/tmp$ rustc tmp.rs
tmp.rs:7:30: 7:31 error: expecting '{' but found '('
tmp.rs:7 io::print(fmt!("%s says: '%d'\n", name, *num))
chris@chris-linux-desktop:/tmp$ cat tmp.rs
fn main() {
for ["Alice", "Bob", "Carol"].each |name| {
let name = copy *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))
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels