Skip to content

Instantly share code, notes, and snippets.

@redsquirrel
Created September 18, 2009 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save redsquirrel/189190 to your computer and use it in GitHub Desktop.
Save redsquirrel/189190 to your computer and use it in GitHub Desktop.
SICP 1.1
Fork me. Solve me.
====
10 <= 10
12 <= (+ 5 3 4)
8 <= (- 9 1)
3 <= (/ 6 2)
6 <= (+ (* 2 4) (- 4 6))
a <= (define a 3)
b <= (define b (+ a 1))
19 <= (+ a b (* a b))
false <= (= a b)
4 <=
(if (and (> b a) (< b (* a b)))
b
a)
16 <=
(cond ((= a 4) 6)
((= b 4) (+ 6 7 a))
(else 25))
6 <=
(+ 2 (if (> b a) b a))
16 <=
(* (cond ((> a b) a)
((< a b) b)
(else -1))
(+ a 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment