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

3 lines
95 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
let collection = vec![1, 2, 3, 4, 5];
collection.iter().for_each(|elem| println!("{}", elem));