Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:476499
1 2 3 4 5 6 7 8 9 10 11 12
(define (sum-of-largest-two-squared a b c)
(define (square x) (* x x))
(define smallest-squared (cond ((and (< a b) (< a c)) (square a))
((and (< b a) (< b c)) (square b))
(else (square c))))
(define all-squared (+ (square a) (square b) (square c)))
(- all-squared smallest-squared))
 
(sum-of-largest-two-squared 1 2 3)
 
; *** ERROR IN sum-of-largest-two-squared, "1/3.scm"@3.63 -- Operator is not a PROCEDURE
; using gambit scheme (scheme r5rs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.