
I've always called my local definitions of this function `sortOn`. I also
frequently define `groupOn`.
I dislike the suggestion to use rewrite rules. It's not always an
optimization to memoize the key to sort on. For example, `sortOn id` is
probably slower than `sortBy (comparing id)`. Also, if the key is very
large, it could be a pretty bad regression.
On Sun, Apr 6, 2014 at 6:48 AM, Daniel Trstenjak wrote: Hi John, I only somehow dislike the name 'sortByKey', because 'Key' feels
a bit generic, without giving that much of a hint, perhaps something
like 'sortMapped' could be a bit more telling. Greetings,
Daniel
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries