Day6 and let identifiers contain ?
This commit is contained in:
19
aoc2023/Aoc.newt
Normal file
19
aoc2023/Aoc.newt
Normal file
@@ -0,0 +1,19 @@
|
||||
module Aoc
|
||||
|
||||
import Prelude
|
||||
|
||||
nums : String → List Int
|
||||
nums s = map stringToInt $ filter (_/=_ "") $ split (trim s) " "
|
||||
|
||||
isDigit : Char -> Bool
|
||||
isDigit '0' = True
|
||||
isDigit '1' = True
|
||||
isDigit '2' = True
|
||||
isDigit '3' = True
|
||||
isDigit '4' = True
|
||||
isDigit '5' = True
|
||||
isDigit '6' = True
|
||||
isDigit '7' = True
|
||||
isDigit '8' = True
|
||||
isDigit '9' = True
|
||||
isDigit _ = False
|
||||
Reference in New Issue
Block a user