Created
August 10, 2020 16:07
-
-
Save c650/7c5a7d9ccee1d8449e14e6f5c4caa3cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let v = vec![1,2,3,4]; | |
let b: Vec<i32> = v.iter().map(|e| e * 2).collect(); | |
println!("{:?}", b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment