def selected
bendvy-ecs-core@0.1.0.4 · captured_schedule_local.bend:20
import bendvy-ecs-core@0.1.0.4/captured_schedule_local.bend as CapturedScheduleLocal
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/local.bend as Local
import bendvy-ecs-core@0.1.0.4/captures.bend as Capture
import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as Comp
20def selected(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~Args:Data,~Error:Data,~Out:Type,~runner:W.World<S,C,R,E> -> L -> Args -> Local.Outcome<W.World<S,C,R,E>,L,Error,Out>,allowed:Bool,leaf:Leaf<S,C,R,E,L,Args,Error,Out,runner>,world:W.World<S,C,R,E>) -> Comp.Outcome<W.World<S,C,R,E>,Leaf<S,C,R,E,L,Args,Error,Out,runner>,Error>:
21 match allowed leaf:
22 case False{}, leaf:Comp.Refused{world,leaf}
23 case True{}, Leaf{instance,args,False{}}:Comp.Skipped{world,Leaf{Capture.skip(~S,~C,~R,~E,~L,~Args,~Error,~Out,~runner,instance),args,False{}}}
24 case True{}, Leaf{instance,+args,True{}}:returned(~S,~C,~R,~E,~L,~Args,~Error,~Out,~runner,args,True{},Capture.run(~S,~C,~R,~E,~L,~Args,~Error,~Out,~runner,instance,world,args))