Added SICP exercise 1.46