Skip to content

Instantly share code, notes, and snippets.

@adbrowne
Last active December 17, 2015 00:19
Show Gist options
  • Save adbrowne/5519816 to your computer and use it in GitHub Desktop.
Save adbrowne/5519816 to your computer and use it in GitHub Desktop.
SICP Exercise 1.3
(define (sum-of-squares a b)
(+ (square a) (square b)))
(define (sum-of-squares-of-max-2 a b c)
(if (> a b)
(if (> b c)
(sum-of-squares a b)
(sum-of-squares a c))
(if (> a c)
(sum-of-squares a b)
(sum-of-squares b c))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment