title: How to lexicographically compare scala tuples?
body: <p>Given two tuples of the same arity, how can I lexicographically compare them? It seems like this should be as simple as in the following snippet, but it isn't. Any simple example of how to do it?</p>
  
  <pre><code>var x = (1,2,3) &lt; (1,2,4)
  </code></pre>
  
  <p>Were they lists, I could define a recursive function that would compare the lists' head until a difference or the end of a list was found, but I don't think I could do that for tuples.</p>