def map_leaf

stelliferous@0.0.2.0 · tensor_band.bend:211

import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
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/proofs/traversal_certificate.bend as TraversalCertificate

211def map_leaf(~Element: Data,~Context: Data,~operation: Context -> Element -> Element,+context: Context,buffer: Storage.Buffer<Element>) -> Storage.Buffer<Element>:
212  Storage.Buffer{storage,+length,certificate} = buffer
213  Storage.Buffer{Traversal.map_in_place(~Element,~Context,~operation,length,0,context,storage),length,
214    TraversalCertificate.map_in_place(~Element,~Context,~operation,length,0,context,storage,certificate)}

Uses (3)

Used by (1)