Calling closures in a Vec

from blog Jonas Hietala, | ↗ original
In rust one might want to have a list of closures, for example as a list of callbacks. let mut fs: Vec||> = Vec::new(); fs.push(|| { println!("imma firing my lazer"); }); for f in fs.iter() { f(); // error: expected function but found `&||` }; Maybe if we borrow f? for &f in fs.iter() { // error: cannot move out of dereference of...