SICP - Section 1.2


Section 1.2 - Procedures and the Processes they Generate You can see all of my code here. Exercise 1.9 ; Version 1 (define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) ; Version 2 (define (+ a b) (if (= a 0) b (+ (dec a) (inc b)))) Version 1 expands in a way that is linearly recursive. The space requirement is a factor of n where n is the number supplied as the formal parameter a.…
Read more ⟶

SICP - Section 1.1.7


SICP Notes & Exercises - Starting at 1.1.7 I started reading SICP this week. I found Eli Bendersky’s series of SICP reading notes while looking for exercise answers to compare mine to and thought it was a fantastic idea. Also this week, Nadia Eghbal’s blog post about making her own PhD introduced me to the idea of “learning in public”. So I’m going to synthesize these two ideas and document some of my own thoughts and exercise solutions.…
Read more ⟶