mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
19 lines
555 B
Plaintext
19 lines
555 B
Plaintext
String.equal
|
|
: ∀(a: String) ∀(b: String) Bool
|
|
= λa λb
|
|
let P = λx ∀(b: String) Bool
|
|
let cons = λa.head λa.tail λb
|
|
let P = λx ∀(a.head: Char) ∀(a.tail: String) Bool
|
|
let cons = λb.head λb.tail λa.head λa.tail
|
|
(Bool.and
|
|
(U60.equal a.head b.head)
|
|
(String.equal a.tail b.tail)
|
|
)
|
|
let nil = λa.head λa.tail Bool.false
|
|
(~b P cons nil a.head a.tail)
|
|
let nil = λb
|
|
let P = λx Bool
|
|
let cons = λb.head λb.tail Bool.false
|
|
let nil = Bool.true
|
|
(~b P cons nil)
|
|
(~a P cons nil b) |