Skip to content

Instantly share code, notes, and snippets.

@sritchie
Forked from robinkraft/sam.clj
Created January 25, 2012 18:02
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 sritchie/1677628 to your computer and use it in GitHub Desktop.
Save sritchie/1677628 to your computer and use it in GitHub Desktop.
first macro!
(defmacro sam [expr pos zero neg]
(if (< 0 (eval expr))
pos
(if (> 0 (eval expr))
neg
zero)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment