A predicate is a function that returns true or false. In filtering, it decides whether each value remains in the output or is rejected. section 4.4
Mistake: hiding a Boolean result behind unnecessary control flow
This verbose predicate initializes a variable, assigns true or false through an if/else, and returns it. Since the comparison already computes the answer, return it directly: `bool isEven(int n) { return n % 2 == 0; }` The shorter version is easier to read and maintain. section 12.4
Predicates also compose with ranges. A transform can normalize values before a filter predicate retains only values satisfying its condition, such as evenness. section 4.4




