def decision
bendvy-ecs-core@0.1.0.4 · captured_schedule_condition.bend:29
import bendvy-ecs-core@0.1.0.4/captured_schedule_condition.bend as CapturedScheduleCondition
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/schedule.bend as Sch
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
import bendvy-ecs-core@0.1.0.4/captured_schedule.bend as Run
import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as Comp
import bendvy-ecs-core@0.1.0.4/ordinary_condition_composition.bend as Cond
29def decision(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~B:Type,~Error:Data,~catalog:H -> H & List<&2,Comp.Identity>,~dispatch:H -> W.World<S,C,R,E> -> U32 -> Comp.Outcome<W.World<S,C,R,E>,H,Error>,~select:B -> W.World<S,C,R,E> -> U32 -> Cond.Evaluation<W.World<S,C,R,E>,B>,next:H -> Cond.Bindings<W.World<S,C,R,E>,B,select> -> W.World<S,C,R,E> -> List<&2,Sch.Observation> -> Run.Run<W.World<S,C,R,E>,Owned<S,C,R,E,H,B,Error,catalog,dispatch,select>,S,Cond.Error<Error>>,allowed:Bool,owners:H,conditions:Cond.Bindings<W.World<S,C,R,E>,B,select>,world:W.World<S,C,R,E>,name:String,plan:SP.Plan<S>,+id:U32,+observations:List<&2,Sch.Observation>) -> Run.Run<W.World<S,C,R,E>,Owned<S,C,R,E,H,B,Error,catalog,dispatch,select>,S,Cond.Error<Error>>:
30 match allowed:
31 case False{}:next(owners,conditions,world,List.append(&2,Sch.Observation,observations,[Sch.Skipped{id}]))
32 case True{}:body_done(~S,~C,~R,~E,~H,~B,~Error,~catalog,~dispatch,~select,next,conditions,name,plan,id,observations,dispatch(owners,world,id))