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
2.7 and not in place:
(Array((2,3), (4,2), (1,5)).toList.sort (_._2 < _._2)).toArray