-
-
Save luxbock/97588fd2a4d03f1ef8f7 to your computer and use it in GitHub Desktop.
boo
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 boo->> [& body] | |
(let [syms (repeatedly (count body) gensym) | |
exprs (map (fn [f sym] | |
(if (seq? f) | |
`(~(first f) ~@(next f) ~sym) | |
`(~f ~sym))) | |
(rest body) (rest syms))] | |
`(let [~(first syms) ~(first body) | |
~@(interleave (rest syms) exprs)] | |
~(vec syms)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment