Skip to content

Instantly share code, notes, and snippets.

@redsquirrel
Forked from jimweirich/gist:189248
Created September 22, 2009 00:36
Show Gist options
  • Save redsquirrel/190662 to your computer and use it in GitHub Desktop.
Save redsquirrel/190662 to your computer and use it in GitHub Desktop.
;; SICP 1.5
;; Given:
;;
;; (define (p) (p))
;;
;; (define (test x y)
;; (if (= x 0)
;; 0
;; y))
;; (test 0 (p))
;;
;; Applicative order will recurse infinitely.
;; Normal order will return 0 immediately because it never
;; gets to the "else" clause where y is evaluated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment