Created
October 27, 2013 23:09
-
-
Save markmarch/7189020 to your computer and use it in GitHub Desktop.
Revisions
-
markmarch created this gist
Oct 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ 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