Use first { predicate } instead of filter { predicate }.first()
ProprietaryFolding the predicate into first avoids materializing the intermediate filtered list and short-circuits on the first match.
org. openrewrite. kotlin. performance. UseFirstWithPredicate$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. UseFirstWithPredicate$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.