RosettaCodeData/Task/Loops-Foreach/Rust/loops-foreach-3.rust

3 lines
95 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let collection = vec![1, 2, 3, 4, 5];
collection.iter().for_each(|elem| println!("{}", elem));