Guest User

Untitled

a guest
Jun 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. fn main() {
  2. let v1 = vec![String::from("foo"), String::from("bar")];
  3. let v2 = vec![String::from("baz"), String::from("qux")];
  4.  
  5. let it = v1.iter().map(|s1| v2.iter().map(|s2| s1.clone() + &s2)).flat_map(|x| x);
  6.  
  7. for item in it {
  8. println!("{}", item)
  9. }
  10. }
Add Comment
Please, Sign In to add comment