Skip to content

Instantly share code, notes, and snippets.

@fogus
Created September 13, 2010 19:46
Show Gist options
  • Save fogus/577897 to your computer and use it in GitHub Desktop.
Save fogus/577897 to your computer and use it in GitHub Desktop.
(defn foo [] 42)
(foo)
(defn mk-foo []
foo)
(defn mk-bar []
(mk-foo))
(defn mk-baz []
(binding [mk-foo #(do (fn [] 36))]
(mk-bar)))
((mk-baz))
;=> 36
((mk-bar))
;=> 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment