Skip to content

Instantly share code, notes, and snippets.

@hugoduncan
Created May 31, 2010 16:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugoduncan/420007 to your computer and use it in GitHub Desktop.
Save hugoduncan/420007 to your computer and use it in GitHub Desktop.
(ns repro.repro)
;; define a macro and a function that uses it
(defmacro my-macro
[]
`(println "a"))
(defn do-macro
[]
(my-macro))
(do-macro)
;; now redefine the macro, and the function that uses it
(defmacro my-macro
[]
`(println "b"))
(defn do-macro
[]
(my-macro))
(do-macro)
;; I expect a 'b', but see 'a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment