Created
May 12, 2014 03:00
-
-
Save marioaquino/7da579b057cb0fb3a176 to your computer and use it in GitHub Desktop.
Clojure evaluation order
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
(defn left [] | |
(println "Left") | |
"Left") | |
(defn right [] | |
(println "Right") | |
"Right") | |
(defn middle [a b] | |
(println "Middle " a b) | |
"Middle") | |
(defn outermost [a b c] | |
(println "Outermost...") | |
(println "Outermost " (a) b (c))) | |
(outermost left (middle :a :b) right) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
without a REPL, I'd guess:
Middle :a :b
Outermost...
Left
Right
Outermost Left Middle Right