How iteration changes when you move from mutable loops to function-and-data transformations.
Java’s default iteration tools are loops, indexes, and mutable accumulators. Clojure’s defaults are different:
map / filter / reduce.loop/recur when you need an explicit, local loop.Practical tip: if your Java solution is “for-loop + mutable variable”, your first Clojure translation is usually
reduceor a pipeline, not direct recursion.
This section helps you transfer the intent of a loop into a Clojure shape that is idiomatic and easier to test.