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 3.56 merge streams

SICP Exercise 4.9 do for while until

SICP Exercise 4.14 map as compound vs. primitive type