My answer of SICP's exercise.