ExecutionQueryColumn.effect_tree: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/execution_query_column.bend as ExecutionQueryColumn Lines 35-39 of bendvy-ecs-core@0.1.0.3/execution_query_column.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/execution_query_column.bend&start_line=35&end_line=39 import Base import bendvy-ecs-core@0.1.0.3/chunk_column.bend as Col import bendvy-ecs-core@0.1.0.3/chunk_shape.bend as Part import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as L import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick import bendvy-ecs-core@0.1.0.3/execution_effects.bend as E def effect_tree(~S:Data,~F:Type -> Type,~effects:E.Effects,~layout:L.Layout,~route:L.Route,-O:Type,shape:Part.Shape,column:Col.Column,+index:U32,+tick:Tick.Tick,state:O,operation:L.payload(layout,route) -> O -> F(L.payload(layout,route) & O)) -> F(Update): match shape column: case Part.Leaf{} Col.Leaf{values,stamps}:effect_taken(~S,~F,~effects,~layout,~route,O,stamps,index,tick,state,operation,Array.swap(Maybe<&1,L.stored(layout,route)>,values,index,None{})) case Part.Branch{+half,leftShape,rightShape} Col.Branch{_,left,right}:effect_branch(~F,~effects,S,L.stored(layout,route),L.payload(layout,route),O,half,left,right,(column=>state=>operation=>effect_tree(~S,~F,~effects,~layout,~route,O,leftShape,column,index,tick,state,operation)),(column=>state=>operation=>effect_tree(~S,~F,~effects,~layout,~route,O,rightShape,column,U32.sub(index,half),tick,state,operation)),state,operation,U32.is_lt(index,half)) case _ column:E.pure(~F,Update,effects,Updated{column,state,False{}}) Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/change_tick.bend&name=Tick https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/chunk_column.bend&name=Column https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/chunk_shape.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend&name=Layout https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend&name=Route https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend&name=payload https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend&name=stored https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_effects.bend&name=Effects https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_effects.bend&name=pure https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_query_column.bend&name=Update https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_query_column.bend&name=effect_branch https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_query_column.bend&name=effect_taken