
28 Sep
2011
28 Sep
'11
6:49 p.m.
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.