Skip to content

Instantly share code, notes, and snippets.

@lan496
Created April 27, 2015 08:14
Show Gist options
  • Save lan496/0090d1a62654649e0025 to your computer and use it in GitHub Desktop.
Save lan496/0090d1a62654649e0025 to your computer and use it in GitHub Desktop.
(define (min x y)
(cond
((> x y) y)
((= x y) x)
((< x y) x)
)
)
(define (3-min x y z)
(min
(min x y)
(min y z)
)
)
(define (square x)
(* x x)
)
(define (two-large-square x y z)
(-
(+
(square x)
(square y)
(square z)
)
(3-min x y z)
)
)
(display (two-large-square 1 2 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment