Added SICP exercise 1.23