Last active
December 28, 2015 19:45
-
-
Save devth/24c930ed95b8f7100664 to your computer and use it in GitHub Desktop.
This file contains 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 ^:dynamic *foo*) | |
(defprotocol A | |
(t [_])) | |
(defrecord AA [] | |
A | |
(t [_] *foo*)) | |
(t (->AA)) ; Unbound as expected | |
(binding [*foo* 1] | |
(t (->AA))) ; 1 | |
(defn make-a [] | |
(binding [*foo* 2] | |
(->AA))) | |
(t (make-a)) ; Unbound: sad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment