Proposal: adding 'tailDropWhile' to Data.List

Evan Laforge qdunkan at gmail.com
Thu Sep 29 00:49:56 CEST 2011


> 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) []

Nothing wrong, in fact that's what I have bound to rDropWhile (the
foldr line, not the double reverse line).  Probably almost everyone
who writes a significant amount of haskell has this function in their
utility libraries.



More information about the Libraries mailing list