title: Scala: how can I sort an array of tuples by their second element?
body: <p>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.</p>
  
  <p>Thanks!</p>