summaryrefslogtreecommitdiff
path: root/2020/6.hs
diff options
context:
space:
mode:
Diffstat (limited to '2020/6.hs')
-rw-r--r--2020/6.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/2020/6.hs b/2020/6.hs
index 14aa44a..be45715 100644
--- a/2020/6.hs
+++ b/2020/6.hs
@@ -1,18 +1,12 @@
module Main (main) where
import qualified Data.List.NonEmpty as NE
-import Data.List.NonEmpty (NonEmpty(..), (<|))
import qualified Data.Set as Set
import Input
+import Util
-splitOn :: (a -> Bool) -> [a] -> NonEmpty [a]
-splitOn _ [] = [] :| []
-splitOn f (x:xs) | f x = [] <| splitOn f xs
- | otherwise = let l :| ls = splitOn f xs
- in (x : l) :| ls
-
main :: IO ()
main = do
input <- getInput 6