diff --git a/2020/2.hs b/2020/2.hs index cb2d5a6..5b18e62 100644 --- a/2020/2.hs +++ b/2020/2.hs @@ -1,11 +1,5 @@ import Data.Char -data Entry = MkEntry { min :: Integer - , max :: Integer - , chr :: Char - , pass :: String - } - count x = length . filter ((==) x) main = readFile "2" >>= putStrLn . show . length . filter (parse 0 0) . lines where valid min max chr pass = let x = count chr pass