StorageShape.store: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/storage_shape.bend as StorageShape Lines 53-64 of stelliferous@0.0.2.0/proofs/storage_shape.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/storage_shape.bend&start_line=53&end_line=64 import Base import stelliferous@0.0.2.0/proofs/storage_tree_model.bend as Tree def store(-Element: Data,+depth: Nat,+tree: Tree.Tree,+capacity: U32,+index: U32,+value: Element, balanced: Balanced(Element,depth,tree)) -> Balanced(Element,depth,Tree.store(Element,tree,capacity,index,value)): match depth tree: case 0n Tree.Leaf{previous}: Unit{} case 0n Tree.Node{left,right}: match balanced: case 1n+rest Tree.Leaf{previous}: match balanced: case 1n+ +rest Tree.Node{+left,+right}: Both{+left_balanced,+right_balanced} = balanced store_node(Element,rest,left,right,U32.shr(capacity),index,value,U32.is_lt(index,U32.shr(capacity)), left_balanced,right_balanced, store(Element,rest,left,U32.shr(capacity),index,value,left_balanced), store(Element,rest,right,U32.shr(capacity),(index - U32.shr(capacity) : U32),value,right_balanced)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_shape.bend&name=Balanced https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_shape.bend&name=Both https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_shape.bend&name=store_node https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=Tree https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=store