diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2021-12-20 11:25:34 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2021-12-20 12:28:20 +0200 |
| commit | 47a2c42249aab79dd2aec4554d3387d2b47ced21 (patch) | |
| tree | b36ad2d28f6432ebe1e5d01772a519f7b4ac97d0 /utils.hs | |
| parent | 247d7534c247f19be84c0984581279ef5545b1e6 (diff) | |
Day 19
Diffstat (limited to 'utils.hs')
| -rw-r--r-- | utils.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,9 +8,9 @@ import Control.Applicative (ZipList (ZipList, getZipList)) infixr 6 $> -splitOn :: (Char -> Bool) -> String -> [String] +splitOn :: (a -> Bool) -> [a] -> [[a]] splitOn p s = case dropWhile p s of - "" -> [] + [] -> [] s' -> w : splitOn p s'' where (w, s'') = break p s' |
