SICP/chapter_2: exercise 2.42-2.45