projects
/
advent-of-code-22.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4df30f4
)
Selecting case properly
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Sat, 3 Dec 2022 09:05:06 +0000
(09:05 +0000)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Sat, 3 Dec 2022 09:05:06 +0000
(09:05 +0000)
advent03/Main.hs
patch
|
blob
|
history
diff --git
a/advent03/Main.hs
b/advent03/Main.hs
index 409ca338c6cc396c83e41b9ab1be4b055582cf50..8ebba26fd8398332f51144bdb3432dd488bb251a 100644
(file)
--- a/
advent03/Main.hs
+++ b/
advent03/Main.hs
@@
-57,5
+57,5
@@
commonItem (Rucksack contents1 contents2) = S.findMin (c1 `S.intersection` c2)
priority :: Char -> Int
priority item
- | i
tem >= 'a'
= ord item - ord 'a' + 1
+ | i
sLower item
= ord item - ord 'a' + 1
| otherwise = ord item - ord 'A' + 27