fn echo(n: &i32) { println!("{}", n); } fn main() { let a: [i32; 5]; a = [1, 2, 3, 4, 5]; let _: Vec<_> = a.into_iter().map(echo).collect(); }