def product_count
bendvy-ecs-core@0.1.0.4 · ordinary_schema_provision.bend:48
import bendvy-ecs-core@0.1.0.4/ordinary_schema_provision.bend as OrdinarySchemaProvision
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
48def product_count(~S:Data,~L:Type,~R:Type,~leftCount:L -> List<&2,W.Handle<S>> -> L & List<&2,Maybe<&2,U32>>,~rightCount:R -> List<&2,W.Handle<S>> -> R & List<&2,Maybe<&2,U32>>,store:Product.Owner<L,R>,handles:List<&2,W.Handle<S>>) -> Product.Owner<L,R> & List<&2,Maybe<&2,U32>>:
49 match store:
50 case Product.Owner{left,right}:
51 +handles=handles
52 product_left(~S,~L,~R,~rightCount,right,handles,leftCount(left,handles))