Created
September 7, 2011 17:22
-
-
Save PasiHeikkinen/1201170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defmacro my-route | |
| [method path handler] | |
| `(~method ~path {cookies# :cookies params# :params} (~handler cookies# params#))) | |
| (defmacro def-my-routes | |
| [name & body] | |
| (let [stuff (map (fn [route] `(my-route ~@route)) body)] | |
| `(defroutes ~name | |
| ~@stuff))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment