In Scala 2.8, I had a need to call List.min and provide my own compare function to get the value based on the second element of a Tuple2. I had to write this kind of code:>
In Scala 2.9, you can do list minBy { _._2 }.
list minBy { _._2 }