StorageTreeModel.store: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/storage_tree_model.bend as StorageTreeModel Lines 40-45 of stelliferous@0.0.2.0/proofs/storage_tree_model.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&start_line=40&end_line=45 import Base def store(-T: Data,tree: Tree,+n: U32,+i: U32,+v: T) -> Tree: match tree: case Leaf{old}: Leaf{v} case Node{+l,+r}: Bool.pick(Tree,U32.is_lt(i,U32.shr(n)),Node{store(T,l,U32.shr(n),i,v),r},Node{l,store(T,r,U32.shr(n),U32.sub(i,U32.shr(n)),v)}) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shr https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=Tree