consider this piece of code:
Welcome to Scala version 2.8.0.r0-b20100714201327 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20).
scala> val a = IntMap((1,1))
a: scala.collection.immutable.IntMap[Int] = IntMap((1,1))
scala> a.map(x => (x._1,x._2 + 1))
res23: scala.collection.immutable.Map[Int,Int] = Map((1,2))
header of IntMap.map says this
def map [B] (f: ((Int, T)) ⇒ B) : immutable.IntMap[B]
[use case] Builds a new collection by applying a function to all elements
of this immutable integer map.
How should I construct the lambda to return IntMap?
Under Scala 2.8, I get