Understand recursion as a problem-solving shape with a base case, a smaller recursive step, and clear trade-offs against loops and reduce.
Recursion is a way to define a computation in terms of smaller computations of the same shape. Every recursive definition needs two parts:
If you are coming from Java, you probably associate recursion with algorithms class and stack overflows. In Clojure, recursion is still a real tool, but you will also learn safer iteration shapes (reduce, loop/recur) and a strong preference for transforming sequences instead of managing indexes.
The goal of this section is to make recursion feel like a clear design pattern rather than a risky trick.