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 e
Daniel's solution works if you want to use < but if you need a compare method you can do the following (for example).
<
compare
implicitly[Ordering[Tuple2[Int, Int]]].compare((1,2), (2,3))
There are orderings defined for all tuples with comparable parts.