Advertisement
Guest User

clojure 1.7.0 evaluates function at compile time

a guest
Jan 1st, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; At compile time, this clojure file is outputting the evaluation of test-observe
  2. ; I reduced it to its minimal code to reproduce the issue
  3. ; using org.clojure:clojure:1.7.0
  4.  
  5. ---CLJ FILE---
  6. (ns dev.observe)
  7.  
  8. (defmacro observe [thing]
  9.   (let []
  10.     (println &env)
  11.     ))
  12.  
  13. (defn test-observe []
  14.   (let [x 1]
  15.     (observe x)
  16.     )
  17.   )
  18.  
  19. ---COMPILE TIME OUTPUT---
  20. {x #<LocalBinding clojure.lang.Compiler$LocalBinding@88837e2>}
  21. #'dev.observe/test-observe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement