3 ms·
Clojure has the thread first/last macros -> and ->> which pipes each result to the next form.
by spapas82 4y ago
Clojure has the thread first/last macros -> and ->> which pipes each result to the next form.
- ianthehenry 4y agoYeah, and Janet copies Clojure's threading macros (that's how I implemented pipe syntax -- split on pipes, add some parens, and stick them into a -> form). I've just never seen it done infix like this -- it's very convenient when you don't have something like paredit to quickly wrap an expression.
- eyelidlessness 4y agoAnd this is why Lisp is amazing. Seeing the question I immediately thought “this looks like a really nice convenience macro for the author’s preferred formatting”!