2018/Day1A.hs

9 lines
155 B
Haskell
Raw Normal View History

2018-12-01 13:52:17 +00:00
module Day1A where
2018-12-01 15:21:38 +00:00
read' :: String -> Int
2018-12-01 13:52:17 +00:00
read' ('+':str) = read str
read' str = read str
main :: IO ()
main = interact $ show . sum . map read' . lines