mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
19 lines
292 B
Plaintext
19 lines
292 B
Plaintext
U60.parser.decimal
|
|
: (Parser #U60)
|
|
= (Parser.bind
|
|
String
|
|
#U60
|
|
Parser.decimal
|
|
λchars
|
|
(Parser.pure
|
|
#U60
|
|
(List.fold
|
|
Char
|
|
chars
|
|
∀(r: #U60) #U60
|
|
λh λt λr (t #(+ #(- h #48) #(* r #10)))
|
|
λr r
|
|
#0
|
|
)
|
|
)
|
|
) |