dropWhileEnd moves to Utils.
This commit is contained in:
@@ -1 +1,5 @@
|
||||
module Language.Haskell.GhcMod.Utils where
|
||||
|
||||
-- dropWhileEnd is not provided prior to base 4.5.0.0.
|
||||
dropWhileEnd :: (a -> Bool) -> [a] -> [a]
|
||||
dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) []
|
||||
|
||||
Reference in New Issue
Block a user