What recursion gives you



Expressive, naturally maps to recursive data (trees, lists, combinations).
Easier to implement some algorithms cleanly.
Cost: stack depth, sometimes exponential time if repeated subproblems — fixable via memoization.





Recap: the anatomy of a recursive function




Base case(s) — must cover...