Created
August 19, 2010 01:15
-
-
Save anonymous/536715 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 replace-in-form [form orig sub] | |
| (if (seq? form) | |
| (map #(replace-in-form %1 orig sub) form) | |
| (if (= form orig) | |
| sub | |
| form))) | |
| (defmacro zet! [a form] | |
| `(reset! ~a ~(replace-in-form form a `(deref ~a)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment