(define code-1 '(let ( (x 1) (y 2) ) ;(displayln (list "got" x y)) (let ( (z (+ x y)) ) ;(displayln (list "z" z)) (if (< x y) (list "x smaller") (list "y smaller") ) ) )) (define (test-1) (newline) (displayln code-1) (displayln (eval code-1)) (newline) ; test the if transform (define t1 (transform-if-to-cond code-1)) (displayln t1) (displayln (eval t1)) (newline) ; test the let transform (define t2 (transform-let-to-apply code-1)) (displayln t2) (displayln (eval t2)) (newline) ; test the two different composition orders of the transforms (define t3 (transform-let-to-apply (transform-if-to-cond code-1))) (displayln t3) (displayln (eval t3)) (newline) (define t4 (transform-if-to-cond(transform-let-to-apply code-1))) (displayln t4) (displayln (eval t4)) )