Skip to content

Instantly share code, notes, and snippets.

@kouddy
Created February 14, 2015 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kouddy/83657149f5631c017b55 to your computer and use it in GitHub Desktop.
Save kouddy/83657149f5631c017b55 to your computer and use it in GitHub Desktop.
(define (square x)
(* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
(define (sum-of-highest-squares x y z)
(cond ((< x y z) (sum-of-squares y z))
((< y z x) (sum-of-squares z x))
((< z x y) (sum-of-squares x y))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment