SICP Exercise 2.83 raise within the tower

Exercise 2.83.  Suppose you are designing a generic arithmetic system for dealing with the tower of types shown in figure 2.25: integer, rational, real, complex. For each type (except complex), design a procedure that raises objects of that type one level in the tower. Show how to install a generic raise operation that will work for each type (except complex).

SOLUTION

The code and tests are here.

Comments

Popular posts from this blog

SICP Exercise 4.9 do for while until

SICP Exercise 1.22 search-for-primes

SICP Exercise 3.56 merge streams