Created
November 17, 2011 09:48
-
-
Save w01fe/1372805 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 <- [& body] | |
`(-> ~(last body) ~@(butlast body))) | |
(deftest <--test | |
(is (= [2 3] | |
(-> {1 1} | |
(assoc 3 4) | |
(update-in [1] inc) | |
(->> (map-vals dec) | |
(map-keys inc) | |
(<- (update-in [2] inc) | |
(map [2 4]))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment