Map.has.go: def of Base
Import: import Base
Lines 2884-2900 of Base/base.bend: https://jend.leeeet.dev/read.txt?path=Base/base.bend&start_line=2884&end_line=2900
import Base
def Map.has.go(-a: Quant, -V: Kind(a), node: Map, kb: String & Bool) ->
Map & Bool:
match node kb:
case MNode{p, MTip{}, hi} Tuple{key, False{}}:
(MNode{p, MTip{}, hi}, False{})
case MNode{p, MLeaf{k, v}, hi} Tuple{key, False{}}:
Map.lo(a, V, Bool, p, hi, Map.has.leaf(a, V, v, String.cmp(key, k)))
case MNode{p, MNode{+q, c, d}, hi} Tuple{key, False{}}:
Map.lo(a, V, Bool, p, hi, Map.has.go(a, V, MNode{q, c, d}, Map.bit(key, q)))
case MNode{p, lo, MTip{}} Tuple{key, True{}}:
(MNode{p, lo, MTip{}}, False{})
case MNode{p, lo, MLeaf{k, v}} Tuple{key, True{}}:
Map.hi(a, V, Bool, p, lo, Map.has.leaf(a, V, v, String.cmp(key, k)))
case MNode{p, lo, MNode{+q, c, d}} Tuple{key, True{}}:
Map.hi(a, V, Bool, p, lo, Map.has.go(a, V, MNode{q, c, d}, Map.bit(key, q)))
case m _:
(m, False{})
Uses (10):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.bit
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.has.leaf
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.hi
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.lo
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.cmp