Skip to content

Instantly share code, notes, and snippets.

@si14

si14/test.clj Secret

Created June 17, 2012 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save si14/cb2458433ee72b72417d to your computer and use it in GitHub Desktop.
Save si14/cb2458433ee72b72417d to your computer and use it in GitHub Desktop.
setting :b to 3
setting :d to 4
(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