splitWith :: (a -> Bool) -> [a] -> [[a]] splitWith f lst = case dropWhile notF lst of [] -> [] lst' -> x : (splitWith f lst'') where (x, lst'') = break notF lst' where notF = not . f