projects
/
advent-of-code-22.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Selecting case properly
[advent-of-code-22.git]
/
advent03
/
Main.hs
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