SICP/chapter_4: exercise 24, optimized interpreter