List functions - "Under" operations

ajb at ajb at
Sat Jan 17 08:24:45 EST 2004

G'day all.

Quoting Brandon Michael Moore <brandon at>:

> 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:

This technique probably doesn't solve all your problems, though.

Andrew Bromage

More information about the Libraries mailing list