def both
import bendvy-ecs-core@0.1.0.4/execution_trace.bend as ExecutionTraceimport Base
73# Generic owner composition has no arity or subscriber-count bound. Order is
74# left then right; each reusable delivery function can itself be another pair.
75# Deliver the same detached batch to two actual owners, left then right, returning
76# both results. Compose this adapter recursively for additional subscribers; this
77# is owner composition, not a global subscription registry.
78def both(~Left:Type,~Right:Type,~Error:Data,~left:Left -> Batch<Error> -> Left,~right:Right -> Batch<Error> -> Right,value:Left & Right,+batch:Batch<Error>) -> Left & Right:
79 match value:
80 case (first,second):(left(first,batch),right(second,batch))
Uses (3)
Used by (0)
No other definition uses this definition.