-
-
Save si14/cb2458433ee72b72417d 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
setting :b to 3 | |
setting :d to 4 |
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
(defn test2 [map] | |
(reify | |
IAssociative | |
(-assoc [coll k v] | |
(.log js/console (str "setting " (pr-str k) " to " (pr-str v))) | |
(test2 (-assoc map k v))))) | |
(defn ^:export init [] | |
(let [a (test2 {:a 1 :b 2})] | |
(assoc a :b 3) | |
(.log js/console "done"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment