Created
June 7, 2011 19:55
-
-
Save hiredman/1013008 to your computer and use it in GitHub Desktop.
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
(def foo (fn foo [x] | |
(if (zero? x) | |
x | |
(foo (dec x))))) | |
(dotimes [i 3] | |
(println "lexical binding run" i) | |
(time | |
(dotimes [i 1000] | |
(foo i)))) | |
(def bar (fn [x] | |
(if (zero? x) | |
x | |
(bar (dec x))))) | |
(dotimes [i 3] | |
(println "var binding run" i) | |
(time | |
(dotimes [i 1000] | |
(bar i)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment