Skip to content

Instantly share code, notes, and snippets.

@w01fe
Created November 17, 2011 09:48
Show Gist options
  • Save w01fe/1372805 to your computer and use it in GitHub Desktop.
Save w01fe/1372805 to your computer and use it in GitHub Desktop.
(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