StorageWitness.read_tree: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/storage_witness.bend as StorageWitness Lines 171-182 of stelliferous@0.0.2.0/proofs/storage_witness.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&start_line=171&end_line=182 import Base def read_tree(-Element: Data,+depth: Nat,-storage: Array,+capacity: U32,+index: U32,choose_left: Bool, witness: Witness(Element,depth,storage)) -> Read: match depth witness: case 0n Leaf{value,owner}: %Equal.sym(Array,storage,ALeaf{value},owner) : Read Read{value,{==}} case 1n+ +rest Node{left,right,owner,left_balanced,right_balanced}: %Equal.sym(Array,storage,ANode{left,right},owner) : Read read_choose(Element,left,right,capacity,index,choose_left, read_tree(Element,rest,left,U32.shr(capacity),index,U32.is_lt(index,U32.shr(U32.shr(capacity))),left_balanced), read_tree(Element,rest,right,U32.shr(capacity),U32.sub(index,U32.shr(capacity)), U32.is_lt(U32.sub(index,U32.shr(capacity)),U32.shr(U32.shr(capacity))),right_balanced)) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get.go https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=LeafWitness https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=NodeWitness https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=Read https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=Witness https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=read_choose