Skip to content

Instantly share code, notes, and snippets.

Created August 19, 2010 01:15
Show Gist options
  • Select an option

  • Save anonymous/536715 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/536715 to your computer and use it in GitHub Desktop.
(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