mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 17:25:31 +03:00
35 lines
543 B
Plaintext
35 lines
543 B
Plaintext
U60.Map
|
|
: ∀(V: *)
|
|
*
|
|
= λV (BBT #U60 V)
|
|
|
|
U60.Map.get
|
|
: ∀(V: *)
|
|
∀(key: #U60)
|
|
∀(map: (U60.Map V))
|
|
(Maybe V)
|
|
= λV λkey λmap
|
|
(BBT.get #U60 V U60.cmp key map)
|
|
|
|
U60.Map.got
|
|
: ∀(V: *)
|
|
∀(key: #U60)
|
|
∀(map: (U60.Map V))
|
|
(Pair (Maybe V) (U60.Map V))
|
|
= λV λkey λmap
|
|
(BBT.got #U60 V U60.cmp key map)
|
|
|
|
U60.Map.set
|
|
: ∀(V: *)
|
|
∀(key: #U60)
|
|
∀(val: V)
|
|
∀(map: (U60.Map V))
|
|
(U60.Map V)
|
|
= λV λkey λval λmap
|
|
(BBT.set #U60 V U60.cmp key val map)
|
|
|
|
U60.Map.new
|
|
: ∀(V: *)
|
|
(U60.Map V)
|
|
= λV (BBT.tip #U60 V)
|