Select
Generic selection of items from a set based on criteria
Mechanism
Deterministic Filter. Applies a Predicate Function P(x) to every element in Input Set S. Returns a new Subset S' containing only elements where P(x) is True. It filters a set based on specific inclusion criteria.
Invariants
- Predicate Truth: For all x in Output, Criterion(x) must be True.
- Subset Property: Output must be a subset of Input (no new items created).
- Determinism: Same input set + same criteria = same output set.
Parameters
- limit: type=Integer, range=[1, 10000], description=Max items to return
- strategy: type=Enum, range={Filter, First}, description=Default: Filter. Random sampling is excluded — it would violate the Determinism invariant.
Preconditions
- Criterion is decidable for item type
- Input set is iterable
Postconditions
- Subset returned
Failure modes
- Empty Result: No items satisfy the criterion (returns empty set).
- Predicate Error: The criterion function fails or throws an error for specific inputs.
Where this came from
—
Used by
- Act references
- Ballot references
- BeamSearch references
- Card composes_with
- DataMinimization references
- Decision references
- OODA composes_with
- Rally composes_with
- Rank composes_with
Identity
- Ref:
Select#decf - Hash: sema:Select#mh:SHA-256:decf9c05490dc5e6b372c5dbb7d89d2285fdd832714fc992b10fdbd6b7c2c2e3
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository