Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a.map(f).zip(a) ===
- a.map(x => (f(x),x))
- a.filter(f).map(g) ===
- a.map(x => (x,g(x))).filter(f(_._1)).map(_._2)
- a.filter(f).flatMap(g) ===
- a.flatMap(x => g(x).map((x,_))).filter(f(_._1)).map(_._2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement