Find Flow.map { } .map { } chains

Proprietary

Two adjacent Flow.map { } operators emit through two transform stages where one would do. Fold them into a single map, or use map { (a, b) -> … } destructuring.

org.openrewrite.kotlin.coroutines.FindFlowMapMapChain$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.coroutines.FindFlowMapMapChain$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.