mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
9 lines
331 B
Plaintext
9 lines
331 B
Plaintext
Kind.Scope.find
|
|
: ∀(nam: String) ∀(scp: Kind.Scope) Kind.Term
|
|
= λname λscope
|
|
let cond = λbnd (~bnd λx Bool λn λt (String.equal name n))
|
|
let found = (List.find Kind.Binder cond scope)
|
|
let P = λx Kind.Term
|
|
let some = λbnd (~bnd λx Kind.Term λn λt t)
|
|
let none = (Kind.ref name Kind.set)
|
|
(~found P some none) |