From 47a2c42249aab79dd2aec4554d3387d2b47ced21 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 20 Dec 2021 11:25:34 +0200 Subject: Day 19 --- utils.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils.hs') diff --git a/utils.hs b/utils.hs index fb1ea96..e7e0d4b 100644 --- a/utils.hs +++ b/utils.hs @@ -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' -- cgit v1.3