def run_handles
bendvy-ecs-core@0.1.0.4 · capture_query.bend:26
import bendvy-ecs-core@0.1.0.4/capture_query.bend as CaptureQuery
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
26def run_handles(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~U:Data,~Out:Data,~Ops:Type -> Type,~A:Data,~plan:Q.Plan<S,C,R,E,Ops>,~body:@-H:Type -> @-caps:Ops(H) -> L -> A -> H -> H & (L & (T.Outcome<U> & Out)),handles:List<&2,W.Handle<S>>,+args:A,+cursor:Maybe<&2,Tick.Tick>,capture:L,tx:T.Tx<W.World<S,C,R,E>,E>) -> L & (T.Tx<W.World<S,C,R,E>,E> & (T.Outcome<Q.Error<U>> & List<&2,Out>)):
27 match handles:
28 case []:(capture,(tx,(T.Success{},[])))
29 case handle <> rest:selected(~S,~C,~R,~E,~L,~U,~Out,~Ops,~A,~plan,~body,args,capture,local => transaction => run_handles(~S,~C,~R,~E,~L,~U,~Out,~Ops,~A,~plan,~body,rest,args,cursor,local,transaction),Q.plan_select(~S,~C,~R,~E,~Ops,plan)(Q.Frame{tx,handle,None{},cursor}))