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
Tweaking and tidying
[advent-of-code-23.git]
/
advent07
/
Main.hs
diff --git
a/advent07/Main.hs
b/advent07/Main.hs
index 8f4350d293e9fd37abba85ad702396b214a923dd..8f3a42445d74b6ffa4596856b47b815a645d7fb6 100644
(file)
--- a/
advent07/Main.hs
+++ b/
advent07/Main.hs
@@
-95,7
+95,7
@@
handP :: Parser Hand
cardP :: Parser Card
handsP = handP `sepBy` endOfLine
cardP :: Parser Card
handsP = handP `sepBy` endOfLine
-handP = Hand <$>
((many1 cardP) <* space)
<*> decimal
+handP = Hand <$>
many1 cardP <* space
<*> decimal
cardP = (Two <$ "2") <|> (Three <$ "3") <|> (Four <$ "4") <|>
(Five <$ "5") <|> (Six <$ "6") <|> (Seven <$ "7") <|>
cardP = (Two <$ "2") <|> (Three <$ "3") <|> (Four <$ "4") <|>
(Five <$ "5") <|> (Six <$ "6") <|> (Seven <$ "7") <|>