SICP/chapter_2: exercise 46-47