unnecessary-fold Prefer a specialized iterator operation over an equivalent fold A boolean reduction expresses an existential or universal predicate through an accumulator. Instead, you SHOULD use some or every to state the predicate and short circuit the iteration. The replacement stops evaluating the predicate once its result is known. - Category: performance - Level: warning - Fix: suggestion - Scope: module Reported function containsPositive(values: int32[]): boolean { return values.reduce((found, value) => found || value > 0, false); } Accepted function containsPositive(values: int32[]): boolean { return values.some((value) => value > 0); } Prior art - Clippy ยท unnecessaryfold language/linter/src/rules/performance/unnecessaryfold.rs:8