Map.ins: def of Base
Import: import Base
Lines 2799-2808 of Base/base.bend: https://jend.leeeet.dev/read.txt?path=Base/base.bend&start_line=2799&end_line=2808
import Base
def Map.ins(
-a: Quant, -V: Kind(a), m: Map, key: String, x: V, +p: Nat
) -> Map:
match m:
case MTip{}:
MLeaf{key, x}
case MLeaf{k, v}:
Map.ins.splice(a, V, p, key, x, MLeaf{k, v})
case MNode{+pos, lo, hi}:
Map.ins.go(a, V, MNode{pos, lo, hi}, x, p, Map.bit(key, pos), Nat.is_lt(pos, p))
Uses (7):
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.ins.go
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.ins.splice
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String