 
            
            
            
            
                5 Aug
                
                    2005
                
            
            
                5 Aug
                
                '05
                
            
            
            
        
    
                5:28 a.m.
            
        Is this function worth to be added to Data.List? {-| Remove the longest suffix of elements satisfying the predicate. In contrast to 'reverse . dropWhile p . reverse' this works for infinite lists, too. -} dropWhileRev :: (a -> Bool) -> [a] -> [a] dropWhileRev p = foldr (\x xs -> if p x && null xs then [] else x:xs) []