Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Demonstration implementation of the `->` macro in Clojure.
(defmacro demo-> [val & fns]
(reduce (fn [acc fname] (list fname acc)) val fns))
(macroexpand '(demo-> 42 inc dec inc)) ; (inc (dec (inc 42)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.