fn main() { let fs: Vec<_> = (0..10).map(|i| {move || i*i} ).collect(); println!("7th val: {}", fs[7]()); }