Solve SICP exercise 2.17
Solve SICP exercise 2.18