def constrain

bendvy-ecs-core@0.1.0.3 · inspector_query_projection.bend:136

import bendvy-ecs-core@0.1.0.3/inspector_query_projection.bend as InspectorQueryProjection
import Base

136# Add a predicate to an existing selection without changing its projected
137# type. Canonical matching short-circuits; projection remains the source route.
138def constrain(~H:Type,~S:Data,~V:Data,~source:DeclaredSelection<H,S,V>,~predicate:Predicate<H,S>) -> DeclaredSelection<H,S,V>:
139  DeclaredSelection{constrained(~H,~S,matches_field(~H,~S,~V,source),predicate_field(~H,~S,predicate)),project_field(~H,~S,~V,source)}

Uses (6)

Used by (0)

No other definition uses this definition.