X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent15%2FMain.hs;h=384c88c4c2b4a4595c119e1d59caeff79ba8acc6;hb=a7b02636b8045a73a4dff090c1b932cfa1afd9bd;hp=7fa47890163291cfe8e4baf228b2897f88f2d091;hpb=bc689ec22856749b96406382eac0345f2f71cb40;p=advent-of-code-23.git diff --git a/advent15/Main.hs b/advent15/Main.hs index 7fa4789..384c88c 100644 --- a/advent15/Main.hs +++ b/advent15/Main.hs @@ -69,8 +69,8 @@ instructionP, removeP, insertP :: Parser Instruction instructionsP = instructionP `sepBy` "," instructionP = removeP <|> insertP -removeP = Remove <$> (many1 letter) <* "-" -insertP = Insert <$> ((many1 letter) <* "=") <*> decimal +removeP = Remove <$> many1 letter <* "-" +insertP = Insert <$> many1 letter <* "=" <*> decimal successfulParse :: Text -> [Instruction] successfulParse input =