daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let names = vec!["Jane", "Jill", "Jack", "John"];
  3.     let len = names.iter().map(|name| {
  4.         name.len()
  5.     })
  6.     .fold(0, |total:usize, curr: usize| {
  7.         total + curr
  8.     });
  9.    
  10.     println!("Total size {} ", len);
  11. }
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