aboutsummaryrefslogtreecommitdiff
path: root/0008/main.hs
diff options
context:
space:
mode:
Diffstat (limited to '0008/main.hs')
-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'