Annotated SICP
- Structure and Interpretation of Computer Programs
- Front Matter
- 1 Building Abstractions with Procedures
- 2 Building Abstractions with Data
- 3 Modularity, Objects, and State
- 4 Metalinguistic Abstraction
- 5 Computing with Register Machines
- References
- List of Exercises

Clojure version of iterative factorial
Clojure doesn’t have tail recursion due to limitations with the JVM so you have to explicitly use ‘recur’:
(defn factorial [n] (fact-iter 1 1 n)) (defn fact-iter [product counter max-count] (if (> counter max-count) product (recur (* counter product) (+ counter 1) max-count)))