Created
October 1, 2015 06:45
-
-
Save Gonzih/6cf053c5ed1c1a808816 to your computer and use it in GitHub Desktop.
as-> in wisp
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
; A bit different from clojure since no lazy sequences | |
(defmacro as-> | |
[expr name & forms] | |
`(let [~name ~expr | |
~@(interleave (repeat (count forms) name) forms)] | |
~name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment