aboutsummaryrefslogtreecommitdiff
path: root/0008
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-08-23 22:03:17 +0800
committerMistivia <i@mistivia.com>2025-08-23 22:07:19 +0800
commit16bb535cdf949eaed2c4981166d82db092915532 (patch)
treec92b6b2a5b9e490ee494c431ad37cc91a5cc00d8 /0008
parent345f3268bdfb191282bf44cdd2c8121c33d2560a (diff)
solve 14
Diffstat (limited to '0008')
-rw-r--r--0008/main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/0008/main.hs b/0008/main.hs
index c852fa7..35a456f 100644
--- a/0008/main.hs
+++ b/0008/main.hs
@@ -9,5 +9,6 @@ findMax13 numbers =
main = do
contents <- readFile "input"
- let max13 = findMax13 $ map digitToInt $ filter (\c -> c >= '0' && c <= '9') contents in
+ let max13 = findMax13 $ map digitToInt $ filter isDigit contents in
putStrLn $ show max13
+ where isDigit x = x <= '9' && x >= '0'