Created
May 5, 2013 04:36
-
-
Save liammclennan/5519722 to your computer and use it in GitHub Desktop.
Sicp 1.1 exercises
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (doit a b c) | |
(define descending (sort (list a b c) >)) | |
(+ (square (car descending)) (square (car (cdr descending)))) | |
) |
My attempt https://gist.github.com/jimmyp/5538332
smallest? is much more elegant than my solution
liam where is car and cdr coming from in your solution?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My attempt using only material already introduced.