TensorOperations.mapped: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_operations.bend as TensorOperations Lines 120-125 of stelliferous@0.0.2.0/tensor_operations.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&start_line=120&end_line=125 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/traversal_array.bend as Traversal import stelliferous@0.0.2.0/tensor_access.bend as Access import stelliferous@0.0.2.0/proofs/traversal_certificate.bend as TraversalCertificate # A mapper is the ordered map of count values from position on a certified # Buffer. mapped applies the operation to one value at a time. def mapped(~Element: Data,~operation: Element -> Element,+count: Nat,+position: U32,buffer: Storage.Buffer) -> Storage.Buffer: Storage.Buffer{storage,length,certificate} = buffer Storage.Buffer{Traversal.map_in_place(~Element,~Unit,~Access.apply_element(~Element,~operation),count,position,Unit{},storage),length, TraversalCertificate.map_in_place(~Element,~Unit,~Access.apply_element(~Element,~operation),count,position,Unit{},storage,certificate)} Uses (7): 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=Unit https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/traversal_certificate.bend&name=map_in_place https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=apply_element https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=map_in_place