mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
12 lines
302 B
Plaintext
12 lines
302 B
Plaintext
Parser.is_eof
|
|
: (Parser Bool)
|
|
= λcode
|
|
let P = λx (Parser.Result Bool)
|
|
let cons = λcode.head λcode.tail
|
|
(Parser.Result.done
|
|
Bool
|
|
(String.cons code.head code.tail)
|
|
Bool.false
|
|
)
|
|
let nil = (Parser.Result.done Bool String.nil Bool.true)
|
|
(~(String.skip code) P cons nil) |