Skip to content

Instantly share code, notes, and snippets.

@oranenj
Created October 11, 2009 22:29
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 oranenj/207927 to your computer and use it in GitHub Desktop.
Save oranenj/207927 to your computer and use it in GitHub Desktop.
(def *op*)
(defn foo [thing]
(apply *op* thing))
(defn bar []
(foo [1 2 3 4 5]))
(binding [*op* +]
(bar)) ; -> 14
(binding [*op* str]
(bar)) ; -> "12345"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment