I'm trying to do a simple aggregation in a collection I've grouped. Like this:
case class Foo(key:String, value:Int)
val minPerKey = lotsOfFoos.groupBy(_.key).mapValues(_.minBy(_.value))
Now I want to do the same in parallel but ParMap doesn't have a mapValues function.
Why is this so, and how should I do it alternatively?