Sunday, September 12, 2010

Question about simplifying Scala 2.8 collections

In this reddit thread, I speculated that Scala's 2.8 collections could be simplified by (among other things) separating def map[B](f: A => B): F[B] and def mapId(f: A => A): F. Can anyone come up with an example where having these be separate methods results in code duplication? I suspect there's no such example, but it might be that I'm not thinking hard enough. Someone prove me wrong!

1 comment:

Ben Hutchison said...

I suggest posting this to the Scala Debate list for a broader discussion?