mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 17:56:48 +03:00
11 lines
391 B
Plaintext
11 lines
391 B
Plaintext
String.unpar
|
|
: ∀(fst: Char) ∀(lst: Char) ∀(str: String) String
|
|
= λfst λlst λstr
|
|
let P = λx String
|
|
let cons = λhead λtail
|
|
let P = λx ∀(head: Char) ∀(tail: String) String
|
|
let true = λhead λtail (String.begin tail)
|
|
let false = λhead λtail (String.cons head tail)
|
|
(~(Char.equal head fst) P true false head tail)
|
|
let nil = String.nil
|
|
(~str P cons nil) |