SHARE
TWEET

Untitled

a guest May 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.  
  3. const FACTOR: u32 = 2;
  4.  
  5. let sum: u32 = (1..10).map(|x| x * FACTOR)
  6. .filter(|&x| x < 20)
  7. .sum();
  8.  
  9. println!("Sum is {}", sum);
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top