Code Review
Compare your solutions
#| BEGIN (Write your solution here) |#
(define (solution x y z)
(define (square a)
(* a a)
)
(define (sum-of-squares a b)
(+ (square a) (square b))
)
(define (smallest a b)
(if (> a b) b a)
)
(define smallest-of-three
(smallest (smallest x y) z)
)
(cond
((= x smallest-of-three) (sum-of-squares y z))
((= y smallest-of-three) (sum-of-squares x z))
(else (sum-of-squares x y))
)
)
#| END |#