{"id":"repo-generator-counting-idiom","text":"Multiple solutions use `sum(pred(x) for x in iterable)` as the standard conditional counting pattern, exploiting Python's `True == 1` coercion and avoiding intermediate list allocation.","truth_value":"IN","source":"entries/2026/06/06/counting-words-with-a-given-prefix-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"repo-generator-counting-idiom","truth_value":"IN","reason":"premise"}]}}