def paired_selected

bendvy-ecs-core@0.1.0.3 · dependency_registration.bend:26

import bendvy-ecs-core@0.1.0.3/dependency_registration.bend as DependencyRegistration
import Base
import bendvy-ecs-core@0.1.0.3/dependency_executor.bend as Exec
import bendvy-ecs-core@0.1.0.3/execution_owner_continuation.bend as Continuation

26def paired_selected(~World:Type,~L:Type,~R:Type,~Error:Data,~Out:Data,~leftDispatch:L -> World -> U32 -> L & (World & Exec.Invocation<Error,Out>),~rightDispatch:R -> World -> U32 -> R & (World & Exec.Invocation<Error,Out>),selected:Bool,left:L,right:R,leftIds:List<&2,U32>,world:World,id:U32) -> Product<L,R> & (World & Exec.Invocation<Error,Out>):
27  match selected:
28    case True{}:
29      continuation:Continuation.PairedHeader<(L & (World & Exec.Invocation<Error,Out>)),(Product<L,R> & (World & Exec.Invocation<Error,Out>))> = Continuation.PairedHeader{R & List<&2,U32>,(right,leftIds),left_returned(~World,~L,~R,~Error,~Out,~leftDispatch,~rightDispatch)}
30      Continuation.paired_returned(L & (World & Exec.Invocation<Error,Out>),Product<L,R> & (World & Exec.Invocation<Error,Out>),continuation,leftDispatch(left,world,id))
31    case False{}:
32      continuation:Continuation.PairedHeader<(R & (World & Exec.Invocation<Error,Out>)),(Product<L,R> & (World & Exec.Invocation<Error,Out>))> = Continuation.PairedHeader{L & List<&2,U32>,(left,leftIds),right_returned(~World,~L,~R,~Error,~Out,~leftDispatch,~rightDispatch)}
33      Continuation.paired_returned(R & (World & Exec.Invocation<Error,Out>),Product<L,R> & (World & Exec.Invocation<Error,Out>),continuation,rightDispatch(right,world,id))

Uses (11)

Used by (1)