Tidying, mainly parsers
[advent-of-code-23.git] / advent02 / Main.hs
index 2e96f1b040fa2867f9e34d5a174464e4921bf2bd..e8e8f03e3ca90b5f7f404079e1baec1d13c0d035 100644 (file)
@@ -91,11 +91,11 @@ cubeP :: Parser Cube
 colourP, redP, greenP, blueP :: Parser Colour
 
 gamesP = gameP `sepBy` endOfLine
-gameP = ParsedGame <$> (("Game " *> decimal) <* ": ") <*> showingsP
+gameP = ParsedGame <$ "Game " <*> decimal <* ": " <*> showingsP
 
 showingsP = showingP `sepBy` "; "
 showingP = cubeP `sepBy` ", "
-cubeP = (flip Cube) <$> (decimal  <* " ") <*> colourP 
+cubeP = (flip Cube) <$> decimal  <* " " <*> colourP 
 
 colourP = redP <|> greenP <|> blueP
 redP = Red <$ "red"