SICP Exercise 2.5
Exercise 2.5. Show that we can represent pairs of nonnegative integers using only numbers and arithmetic operations if we represent the pair a and b as the integer that is the product 2a 3b. Give the corresponding definitions of the procedures cons, car, and cdr.
SOLUTION
The code and tests are here.
SOLUTION
The code and tests are here.
Comments
Post a Comment