def pair

bendvy-ecs-core@0.1.0.4 · ordinary_resource_field_system.bend:57

import bendvy-ecs-core@0.1.0.4/ordinary_resource_field_system.bend as OrdinaryResourceFieldSystem
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Q
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap

57# Compose grants and clauses left before right, retaining both operations. This
58# does not deduplicate clauses or add a new alias/overlap policy.
59def pair(~S:Data,~H:Type,~L:Type,~R:Type,left:Declaration<S,H,L>,right:Declaration<S,H,R>) -> Declaration<S,H,Cap.Bundle<L,R>>:
60  match left right:
61    case Declaration{l,lc} Declaration{r,rc}:Declaration{Cap.Bundle{l,r},List.append(&2,Q.Clause<S>,lc,rc)}

Uses (4)

Used by (1)