is there a way in Scala to sort an array of tuples using and arbitrary comparison function? In particular I need to sort and array of tuples by their second element, but I wante
val l = List((2, 1), (3, 2), (0, 3)) l sort { case(a, b) => a > b }