This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
What would be the canonical way to write (->> stream (map side-effect!) dorun)
, in modern clojure without lazy seqs (i.e. via transducer, reducer, etc), (ignoring doseq, loop, etc
). Also bonus question, what about pmap
?
For parallelism you can slap a core.async pipeline on it, there are a few other things you can do manually, like using an executor service with a fixed size thread pool
was just gonna say... pmap, would be i think either via pipelining with core async, or maybe reducers could do it via fold... but you'd be doing IO on the fork join pool which I think is frowned upon.
Sure, yah, to nit pick though, 'dorun` doesn't materialize a collection of the results, whereas mapv does.