
18 Feb
2010
18 Feb
'10
11:04 a.m.
On Thu, Feb 18, 2010 at 8:07 AM, Evan Laforge
And BTW again, here's something I've occasionally found useful:
-- | Handy to merge or sort a descending list. reverse_compare :: (Ord a) => a -> a -> Ordering reverse_compare a b = case compare a b of LT -> GT EQ -> EQ GT -> LT
I wondered why there wasn't one of these in the standard library until someone pointed out to me that reverse_compare = flip compare which actually takes fewer characters to type :P