5 ms·
You can use named functions interchangeably with anonymous functions, it's not just practical because of pointers.
by Touche 13y ago
You can use named functions interchangeably with anonymous functions, it's not just practical because of pointers.
- catnaroek 13y agoI stand corrected. Indeed, this program worked just fine: fn foo() { println("hai") } fn main() { let xs = ~[1,2,3]; for _ in xs.iter() { std::task::spawn(foo) } }