Skip to content

Instantly share code, notes, and snippets.

@mikedouglas
Created February 28, 2010 03:25
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 mikedouglas/317153 to your computer and use it in GitHub Desktop.
Save mikedouglas/317153 to your computer and use it in GitHub Desktop.
(defmacro named-map* [keys]
`(zipmap (map keyword '~keys) (list ~@keys)))
(defmacro define-method [method map args]
(let [default {:integration_point_name "notifications_per_day"}
named (named-map* args)]
`(defn ~method ~args
(call-method ~(format "facebook.%s" map) (merge default named)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment