List functions - "Under" operations
ajb at spamcop.net
ajb at spamcop.net
Sat Jan 17 08:24:45 EST 2004
G'day all.
Quoting Brandon Michael Moore <brandon at its.caltech.edu>:
> Hello, and welcome me to the list
Welcome you!
> Almost all of the times I use the "By" functions follow that pattern:
> e.g.
> sortFoos :: [Foo] -> [Foo]
> sortFoos = sortBy (\x y -> compare (f x) (f y))
Just noting that this particular example has a very simple solution:
http://haskell.org/hawiki/SchwartzianTransform
This technique probably doesn't solve all your problems, though.
Cheers,
Andrew Bromage
More information about the Libraries
mailing list