4 ms·
This is described later in the tutorial (ctrl-f "lisp heresy"). It's a macro that I wrote, not something built into Janet -- I'm sure I'm not the first person t
by ianthehenry 4y ago
This is described later in the tutorial (ctrl-f "lisp heresy"). It's a macro that I wrote, not something built into Janet -- I'm sure I'm not the first person to do this, but I'm not aware of any lisps that have such a construct built-in.
- spapas82 4y agoClojure 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”!