SICP - Solution: Exercise 1.2

SICP - Solution: Exercise 1.2

September 24, 2018

Exercise 1.2 #

Translate the following expression into prefix form:

$${\frac{5+4+(2-(3-(6+\frac45)))}{3(6-2)(2-7)}.}$$

Solution #

(/ (+ 5
      4
      (- 2
         (- 3
            (+ 6
               (/ 4 5)))))
   (* 3
      (- 6 2)
      (- 2 7)))