Skip to content

Instantly share code, notes, and snippets.

@Isaac-Kleinman
Last active August 29, 2015 14:06
Show Gist options
  • Save Isaac-Kleinman/58ac8b4351358d7aa4a2 to your computer and use it in GitHub Desktop.
Save Isaac-Kleinman/58ac8b4351358d7aa4a2 to your computer and use it in GitHub Desktop.
#lang racket
(define (square x) (* x x))
(define (sum-square x y)
(+ (square x) (square y)))
(define (min x y)
(if (< x y) x y))
(define (max x y)
(if (> x y) x y))
(define (sum-square-max-2 x y z)
(sum-square (max x y) (max (min x y) z)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment