SICP Exercise 2.12 width-of-interval - make-center-percent



Exercise 2.12.  Define a constructor make-center-percent that takes a center and a percentage tolerance and produces the desired interval. You must also define a selector percent that produces the percentage tolerance for a given interval. The center selector is the same as the one shown above.

SOLUTION

The code and tests are here.

Comments

Popular posts from this blog

SICP Exercise 4.18 a alternative strategy for interpreting internal definitions

SICP Exercise 3.11 make-account internal definitions with local state

SICP Exercise 3.13 make-cycle