# Pastebin L4wAGlf6 getInput' :: IO (Int, Int) getInput' = coerce . fold <$> parseFile (move `endBy` "\n") "input/day2" where move = ($) <$> direction <*> num lexeme = L.lexeme hspace num :: Parser (Sum Int) num = L.decimal direction = (,0) <$ lexeme "forward" <|> (\x -> (0, -x)) <$ lexeme "up" <|> (0,) <$ lexeme "down"