Created
October 29, 2015 10:23
-
-
Save rigidus/c4dd64c81881e339626b to your computer and use it in GitHub Desktop.
This file contains 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 -> (forms) | |
(let ((forms (reverse forms))) | |
(if (null (cdr forms)) | |
(car forms) | |
(let ((base (car forms))) | |
(unless (listp base) | |
(setf base (list base))) | |
(list* (car base) | |
(test (reverse (cdr forms))) | |
(cdr base)))))) | |
(macroexpand-1 '(-> ((handler/site app-routes) | |
(wrap-resource "web") | |
(wrap-file-info) | |
(wrap-params) | |
(wrap-keyword-params)))) | |
=> (WRAP-KEYWORD-PARAMS | |
(WRAP-PARAMS | |
(WRAP-FILE-INFO | |
(WRAP-RESOURCE | |
(HANDLER/SITE APP-ROUTES) | |
"web")))), T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment