def indexed_fold
stelliferous@0.0.2.0 · traversal_array.bend:26
import stelliferous@0.0.2.0/traversal_array.bend as TraversalArray
import Base
import stelliferous@0.0.2.0/traversal_loop.bend as Loop
26def indexed_fold(~Value: Type,~Context: Data,~update: U32 -> Context -> Value -> Value,
27 count: Nat,position: U32,context: Context,value: Value) -> Value:
28 indexed_output(~Value,~Context,
29 Loop.run(~State<&2,&1,Unit,Value,Context>,~indexed_step(~Value,~Context,~update),count,
30 State{Unit{},value,position,context}))