This page is no longer maintained — Please continue to the home page at www.scala-lang.org

map2/map3

No replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

Anyone know what syntax is being suggested as an alternative to the now
deprecated map2 and map3, and whether it's real?

* @deprecated use (xs, ys).map(f) instead
* @deprecated use (xs, ys, zs).map(f) instead

I don't see any evidence that either of these has much chance of
working. Losing map2 is no big deal, xs zip ys is fine, but it's a lot
clumsier to use zip once you get to three and beyond because you get
((a,b),c)s where you want (a,b,c)s. (If you look in MatchUtil you will
find my long ago written "ListPlus" class including zip3...)

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland