projects
/
advent-of-code-23.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7364d4
)
Tidying
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Thu, 7 Dec 2023 10:56:55 +0000
(10:56 +0000)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Thu, 7 Dec 2023 10:56:55 +0000
(10:56 +0000)
advent07/Main.hs
patch
|
blob
|
history
diff --git
a/advent07/Main.hs
b/advent07/Main.hs
index 6d326a4f545c08603210a8d9bc73de441fc2a7db..b839511444c0d4eb4f8102b5b3a20596a2e6eb17 100644
(file)
--- a/
advent07/Main.hs
+++ b/
advent07/Main.hs
@@
-33,7
+33,7
@@
part1 hands = sum $ fmap score rankedHands
rankedHands = zip [1..] sortedHands
score (r, CHand _ _ bid) = r * bid
-part2
hands = part1 $ fmap enJoker hands
+part2
= part1 . fmap enJoker
enJoker :: Hand -> Hand
enJoker (Hand cards bid) = Hand jCards bid