StorageRefinement.write_sequence: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/storage_refinement.bend as StorageRefinement Lines 223-235 of stelliferous@0.0.2.0/proofs/storage_refinement.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/storage_refinement.bend&start_line=223&end_line=235 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/proofs/storage_tree_model.bend as Tree # Sequence transfers preserve native modular addressing for every element type. # Logical bounds belong to callers, independently of this representation law. def write_sequence(~Element: Data,+values: List<&2,Element>,+offset: U32,+tree: Tree.Tree) -> {Storage.write_list(Element,values,offset,Tree.pack(Element,tree)) == Tree.pack(Element,Tree.write_sequence(~Element,values,offset,tree)) : Array}: match values: case Nil{}: {==} case +head <> +tail: %Equal.sym(Array,Array.set(Element,Tree.pack(Element,tree),offset,head), Tree.pack(Element,Tree.write(Element,tree,offset,head)),write(Element,tree,offset,head)) : {Storage.write_list(Element,tail,(offset + 1 : U32),_) == Tree.pack(Element,Tree.write_sequence(~Element,tail,(offset + 1 : U32),Tree.write(Element,tree,offset,head))) : Array} write_sequence(~Element,tail,(offset + 1 : U32),Tree.write(Element,tree,offset,head)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_refinement.bend&name=write 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=pack https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=write https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=write_sequence https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=write_list