Proposal: adding 'tailDropWhile' to Data.List

Henning Thielemann lemming at henning-thielemann.de
Thu Sep 29 00:17:31 CEST 2011


On Wed, 28 Sep 2011, Roman Leshchinskiy wrote:

> If performance isn't a concern, what's wrong with using reverse . dropWhile f . reverse? Another easy definition is this:
>
>  foldr (\x xs -> if null xs && f x then [] else x:xs) []

Ah, this is meant with tailDropWhile!

I have it already in my utility package:
    http://hackage.haskell.org/packages/archive/utility-ht/0.0.7/doc/html/Data-List-HT.html#v:dropWhileRev



More information about the Libraries mailing list