Translate Java loop habits into Clojure shapes: map and filter for element work, reduce for accumulation, loop/recur for custom state transitions, and direct recursion for recursive data.
Sometimes recursion is the cleanest way to express an algorithm. But in everyday Clojure, many Java loops map better to higher-order functions (map, filter, reduce) than to explicit recursion.
map.filter.reduce.loop/recur or recursion over the problem shape.Java mental model: the goal is to eliminate index management and mutable accumulators, not to force recursion everywhere.
This section helps you pick the simplest shape that preserves the intent of the original loop.