Re: [Haskell-cafe] Default Tuple Orderings

15 Mar
2009
15 Mar
'09
4:08 a.m.
Mark Spezzano wrote:
In other words my best guess is that the ordering of tuples is by comparing the first tuple elements and then the seconds, thirds etc, until there’s an element less than another.
...until there's an element not equal to the other, yes. It finds the first position at which the two elements in the tuples are unequal and returns the result of comparing those two elements (LT or GT). If there's no such position, then the tuples are equal. See also: http://en.wikipedia.org/wiki/Lexicographical_order HTH, Martijn.
5912
Age (days ago)
5912
Last active (days ago)
0 comments
1 participants
participants (1)
-
Martijn van Steenbergen