Function to add to Data.List

Niklas Haas haskell at nand.wakku.to
Sun Apr 6 12:43:34 UTC 2014


On Sun, 6 Apr 2014 14:34:49 +0200, Daniel Trstenjak <daniel.trstenjak at gmail.com> wrote:
> Am 06.04.2014 um 14:05 schrieb Jake McArthur <jake.mcarthur at gmail.com>:
> > I've always called my local definitions of this function `sortOn`. I also frequently define `groupOn`.
> 
> Oh yes, 'sortOn' is a really nice name. :)
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries

Huh, that name just reminded me of GHC.Exts.sortWith:

http://hackage.haskell.org/package/base-4.6.0.1/docs/GHC-Exts.html#v:sortWith

Which actually has the right type signature, but it's still implemented
as compare (f x) (f y), and for good reasons too in this case.


More information about the Libraries mailing list