Skip to content

Instantly share code, notes, and snippets.

@liammclennan
Created May 5, 2013 04:36
Show Gist options
  • Select an option

  • Save liammclennan/5519722 to your computer and use it in GitHub Desktop.

Select an option

Save liammclennan/5519722 to your computer and use it in GitHub Desktop.
Sicp 1.1 exercises
(define (doit a b c)
(define descending (sort (list a b c) >))
(+ (square (car descending)) (square (car (cdr descending))))
)
@jimmyp
Copy link
Copy Markdown

jimmyp commented May 8, 2013

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