2 ms·
Re: your [1], Clojure's threading macros came to mind first for me as well. (->> [(range 20 31) (range 490 501) (range 8120 8131)] (apply conc
by wging 11y ago
Re: your [1], Clojure's threading macros came to mind first for me as well.
(->>
[(range 20 31) (range 490 501) (range 8120 8131)]
(apply concat)
(map classify)
(reduce getCounts [0 0 0]))
Expands as follows:
user> (macroexpand
'(->>
[(range 20 31) (range 490 501) (range 8120 8131)]
(apply concat)
(map classify)
(reduce getCounts [0 0 0])))
(reduce
getCounts
[0 0 0]
(map classify (apply concat [(range 20 31) (range 490 501) (range 8120 8131)])))
Now that you mention concurrency and flow-control in the context of these macros, it seems a little weird to me that we have "threading macros" that really are about weaving expressions together rather than concurrency/threading.