def edit_scope
bendvy-ecs-core@0.1.0.3 · execution_resource_interpreter.bend:27
import bendvy-ecs-core@0.1.0.3/execution_resource_interpreter.bend as ExecutionResourceInterpreter
import Base
import bendvy-ecs-core@0.1.0.3/execution_resource_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_state.bend as State
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
27def edit_scope(-S:Data,-C:Type,-Resources:Type,-P:Type,-Out:Type,own:Tick.Tick -> (P -> P & Out) -> Resources -> Resources & Store.Edit<P,Out>,source:State.Scope<S,C,Resources>,transform:Tick.Tick -> P -> P & Out,valid:Bool) -> State.Scope<S,C,Resources> & Store.Edit<P,Out>:
28 match source valid:
29 case State.Scope{columns,resources,handles,+tick,prior,view} False{}:(State.Scope{columns,resources,handles,tick,prior,view},Store.Unchanged{transform(tick)})
30 case State.Scope{columns,resources,handles,+tick,prior,view} True{}:scope_returned(S,C,Resources,Store.Edit<P,Out>,columns,handles,tick,prior,view,own(tick,transform(tick),resources))