Created
August 10, 2020 16:22
-
-
Save c650/60ce417c7f11f1064b4fe9047cc37c57 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 = v.iter().map(|e| e * 2).filter(|e| e % 6 == 0).fold(0, |acc, x| acc + x); | |
println!("{:?}", b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment