def pair_drain

bendvy-ecs-core@0.1.0.4 · owned_event_family_catalog.bend:22

import bendvy-ecs-core@0.1.0.4/owned_event_family_catalog.bend as OwnedEventFamilyCatalog
import Base
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product

22def pair_drain(~LA:Type,~LB:Type,~RA:Type,~RB:Type,~drainA:LA -> LA & RA,~drainB:LB -> LB & RB,logs:Product.Owner<LA,LB>) -> Product.Owner<LA,LB> & Product.Owner<RA,RB>:
23  match logs:
24    case Product.Owner{first,second}:joined(~LA,~LB,~RA,~RB,drainA(first),drainB(second))

Uses (3)

Used by (1)