title: How scala orders tuples?
body: <p>I'm trying to understand how scala handles ordering and sorting of tuples</p>
  
  <p>For example, if I got the list</p>
  
  <pre><code>val l = for {i &lt;- 1 to 5} yield (-i,i*2)
  Vector((-1,2), (-2,4), (-3,6), (-4,8), (-5,10))
  </code></pre>
  
  <p>scala knows how to sort it:</p>
  
  <pre><code>l.sorted
  Vector((-5,10), (-4,8), (-3,6), (-2,4), (-1,2))
  </code></pre>
  
  <p>But tuple don't have a '&lt;' method:</p>
  
  <pre><code>l.sortWith(_ &lt; _)
  
  error: value &lt; is not a member of (Int, Int)
  l.sortWith(_ &lt; _)
  </code></pre>
  
  <p>How does scala know how to sort those tuples?</p>