Skip to content

Instantly share code, notes, and snippets.

@TomTriple
Created October 10, 2011 17:13
Show Gist options
  • Save TomTriple/1275819 to your computer and use it in GitHub Desktop.
Save TomTriple/1275819 to your computer and use it in GitHub Desktop.
(defmacro env-is
[ & env-with-action]
`(some #(if (= (first %) "test") (second %) false)
(partition 2 ~env-with-action)))
(println (env-is
"test" #(+ 1 2)
"prod" run-production))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment