def execute

bendvy-ecs-core@0.1.0.3 · execution_deferred_schedule.bend:91

import bendvy-ecs-core@0.1.0.3/execution_deferred_schedule.bend as ExecutionDeferredSchedule
import Base
import bendvy-ecs-core@0.1.0.3/dependency_plan.bend as Plan
import bendvy-ecs-core@0.1.0.3/dependency_executor.bend as Exec

91# Synthetic sync IDs apply buffers before the next condition and produce no body event.
92def execute(~Actual:Type,~Error:Data,~Out:Data,~condition:Actual -> U32 -> Actual & Exec.Condition<Error>,~dispatch:Actual -> U32 -> Actual & Exec.Invocation<Error,Out>,~handler:Actual -> Error -> Actual & Exec.Handling,~apply:List<&2,U32> -> Actual -> Actual & List<&2,U32>,order:List<&2,Plan.Node<String>>,context:Context<Actual>,events:List<&2,Exec.Observation<Error,Out>>) -> Exec.ExecutionResult<Context<Actual>,String,Error,Out>:
93  match order:
94    case []:Exec.Finished{context,events}
95    case Plan.Node{id,_} <> rest:step(~Actual,~Error,~Out,~condition,~dispatch,~handler,~apply,context => events => execute(~Actual,~Error,~Out,~condition,~dispatch,~handler,~apply,rest,context,events),context,id,events)

Uses (12)

Used by (1)