import System.File.ReadWrite import Data.String import Data.List1 part1 : String -> IO () part1 input = let inputLines = lines input grouped = split (== "") inputLines parsed = map (map cast) grouped totals = map (foldr (+) 0) parsed in do printLn $ foldr max 0 totals main : IO () main = do file <- readFile "input" case file of Right content => do putStr "Part 1: " part1 content Left err => printLn err