Skip to content

Instantly share code, notes, and snippets.

@billdozr
Created February 9, 2010 09:11
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 billdozr/299036 to your computer and use it in GitHub Desktop.
Save billdozr/299036 to your computer and use it in GitHub Desktop.
(defmacro in? [obj & choices]
(let [insym (gensym)]
`(let [~insym ~obj]
(or ~@(map (fn [c] `(= ~insym ~c))
choices)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment