Skip to content

Instantly share code, notes, and snippets.

@konchunas
Created February 10, 2019 23:40
Show Gist options
  • Save konchunas/387fb08e1129d6b88295fa5c8a0e0888 to your computer and use it in GitHub Desktop.
Save konchunas/387fb08e1129d6b88295fa5c8a0e0888 to your computer and use it in GitHub Desktop.
fn main() {
let mut numbers = vec![1, 5, 10];
let multiplied = numbers.iter().map(|num| num * 3).collect::<Vec<_>>();
println!("{:?} {:?} ", "result is", multiplied);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment