def product

bendvy-ecs-core@0.1.0.4 · ordinary_schema_dump.bend:71

import bendvy-ecs-core@0.1.0.4/ordinary_schema_dump.bend as OrdinarySchemaDump
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/ordinary_schema_provision.bend as Ordinary

71# Compose dump provisions with matching left/right owner products and
72# entry/count/value order. Does not duplicate affine payloads or validate
73# arbitrary forged callback relationships; ordinary constructors keep them aligned.
74def product(~S:Data,~LC:Type,~LR:Type,~RC:Type,~RR:Type,~leftEmpty:Unit -> LC,~leftCount:LC -> List<&2,W.Handle<S>> -> LC & List<&2,Maybe<&2,U32>>,~leftComponents:LC -> U32 -> LC & List<&2,Maybe<&2,String>>,~leftResources:LR -> LR & List<&2,Maybe<&2,String>>,~rightEmpty:Unit -> RC,~rightCount:RC -> List<&2,W.Handle<S>> -> RC & List<&2,Maybe<&2,U32>>,~rightComponents:RC -> U32 -> RC & List<&2,Maybe<&2,String>>,~rightResources:RR -> RR & List<&2,Maybe<&2,String>>,left:Provision<S,LC,LR,leftEmpty,leftCount,leftComponents,leftResources>,right:Provision<S,RC,RR,rightEmpty,rightCount,rightComponents,rightResources>) -> Provision<S,Product.Owner<LC,RC>,Product.Owner<LR,RR>,Ordinary.product_empty(~LC,~RC,~leftEmpty,~rightEmpty),Ordinary.product_count(~S,~LC,~RC,~leftCount,~rightCount),product_components(~LC,~RC,~leftComponents,~rightComponents),product_resources(~LR,~RR,~leftResources,~rightResources)>:
75  match left right:
76    case Provision{left} Provision{right}:Provision{Ordinary.product(~S,~LC,~LR,~RC,~RR,~leftEmpty,~leftCount,~rightEmpty,~rightCount,left,right)}

Uses (14)

Used by (0)

No other definition uses this definition.