TraversalArray.indexed_step: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/traversal_array.bend as TraversalArray Lines 15-20 of stelliferous@0.0.2.0/traversal_array.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/traversal_array.bend&start_line=15&end_line=20 import Base # Indexed state updates share the traversal counter without requiring an array # destination. The caller establishes any no-wrap bound on the U32 position. def indexed_step(~Value: Type,~Context: Data,~update: U32 -> Context -> Value -> Value, state: State<&2,&1,Unit,Value,Context>) -> State<&2,&1,Unit,Value,Context>: State{Unit{},value,+position,+context} = state State{Unit{},update(position,context,value),(position + 1 : U32),context} Uses (4): 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=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=State