[Haskell-cafe] Tuesday Morning Games (was: Friday Afternoon Play:) The Burrows Wheeler Transformation

Henning Thielemann lemming at henning-thielemann.de
Tue Nov 21 08:10:48 EST 2006


On Tue, 21 Nov 2006, Matthias Fischmann wrote:

>
> On Tue, Nov 21, 2006 at 09:53:09AM +0100, Ketil Malde wrote:
> > sortBy ((. tail . fst) . compare . tail . fst)
>
> this would actually be a nice thing to have in the standard libraries:
>
> sortOn :: (Ord b) => (a -> b) -> [a] -> [a]
> sortOn f = sortBy $ (.f) . compare . f

http://www.haskell.org/pipermail/libraries/2006-November/006169.html


More information about the Haskell-Cafe mailing list