Code Review

Compare your solutions

    (define (square x) (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c) 
  (cond ((and (> a b) (> c b)) (sum-of-squares a c))
         ((and (> a c) (> b c)) (sum-of-squares a b))
         ((and (> b a) (> c a)) (sum-of-squares b c))
         ))

    (define (square x) (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c) 
  (cond ((and (> a b) (> c b)) (sum-of-squares a c))
         ((and (> a c) (> b c)) (sum-of-squares a b))
         ((and (> b a) (> c a)) (sum-of-squares b c))
         ))
    (define (square x) (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c) 
  (cond ((and (> a b) (> c b)) (sum-of-squares a c))
         ((and (> a c) (> b c)) (sum-of-squares a b))
         ((and (> b a) (> c a)) (sum-of-squares b c))
         ))

    (define (square x) (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c) 
  (cond ((and (> a b) (> c b)) (sum-of-squares a c))
         ((and (> a c) (> b c)) (sum-of-squares a b))
         ((and (> b a) (> c a)) (sum-of-squares b c))
         ))