def update_sample

stelliferous@0.0.2.0 · traversal_array.bend:124

import stelliferous@0.0.2.0/traversal_array.bend as TraversalArray
import Base

124# Read the destination's current element, combine it with an owned reader, then
125# store through the same traversal state. Distinct Array owners cannot alias.
126def update_sample(~Reader: Type,~Element: Data,~Sample: Data,~Context: Data,
127  ~combine: Element -> Sample -> Element,~destination: Context -> U32 -> U32,
128  position: U32,context: Context,output: Array<Element>,current: Element,result: Reader & Sample) -> State<&1,&1,Reader,Array<Element>,Context>:
129  (reader,sample) = result
130  store(~Reader,~Element,~Context,~destination,position,context,output,(reader,combine(current,sample)))

Uses (6)

Used by (3)