;; loop/recur iterates without consuming the stack (defn factorial [n] (loop [i n acc 1] (if (zero? i) acc (recur (dec i) (* acc i))))) (println (factorial 5))
stack-safe iteration