Scala: how can I sort an array of tuples by their second element?

Posted by pau.estalella on Stack Overflow See other posts from Stack Overflow or by pau.estalella
Published on 2010-04-13T08:08:13Z Indexed on 2010/04/13 8:13 UTC
Read the original article Hit count: 282

Filed under:
|
|
|

Hi all,

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 wanted to know a general technique to sort arrays of tuples.

Thanks!

© Stack Overflow or respective owner

Related posts about scala

Related posts about sort