SICP Exercise 2.25 Pick 7

Exercise 2.25.  Give combinations of cars and cdrs that will pick 7 from each of the following lists:




(1 3 (5 7) 9)

((7))

(1 (2 (3 (4 (5 (6 7))))))

SOLUTION

The code and tests are here.

Comments

Popular posts from this blog

SICP Exercise 2.56 differentiation rule

SICP Exercise 1.28 (Miller-Rabin Test)

SICP Exercise 4.18 a alternative strategy for interpreting internal definitions