projects
/
advent-of-code-23.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidying, mainly parsers
[advent-of-code-23.git]
/
advent15
/
Main.hs
diff --git
a/advent15/Main.hs
b/advent15/Main.hs
index 7fa47890163291cfe8e4baf228b2897f88f2d091..384c88c4c2b4a4595c119e1d59caeff79ba8acc6 100644
(file)
--- a/
advent15/Main.hs
+++ b/
advent15/Main.hs
@@
-69,8
+69,8
@@
instructionP, removeP, insertP :: Parser Instruction
instructionsP = instructionP `sepBy` ","
instructionP = removeP <|> insertP
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 =
successfulParse :: Text -> [Instruction]
successfulParse input =