Use any { predicate } instead of filter { predicate }.isNotEmpty()

Proprietary

any { predicate } short-circuits on the first match and avoids materializing the intermediate filtered list.

org.openrewrite.kotlin.performance.UseAnyWithPredicate$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.performance.UseAnyWithPredicate$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.