Skip to content

Instantly share code, notes, and snippets.

@nickmcdonnough
Last active August 29, 2015 14:13
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 nickmcdonnough/d72e30f42def74c99698 to your computer and use it in GitHub Desktop.
Save nickmcdonnough/d72e30f42def74c99698 to your computer and use it in GitHub Desktop.
macro hell
(defmacro make-teenth []
(cons `do
(for [day (keys day-num1)]
(let [func-name (clojure.string/replace day #"day" "teenth")]
`(defn ~(symbol func-name)
[month# year#]
(find-teenth month# year# ~day))))))
(make-teenth)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment