Fork me on GitHub

Hi everyone, why the author in this video compose core.async pipeline's like that instead of composing the transducer? @pri

Alex Miller (Clojure team)03:02:53

I don’t know if I can answer to specifics there but one reason to do so is that pipelines let you separate stages and give each a concurrent, possibly different sized pool of threads. Depending on the chunkiness of each stage and whether you need to tee or tap between that can be useful

Alex Miller (Clojure team)03:02:08

Transducers inside a channel occur in a single thread at a time and happen under the channel lock which has blocking consequences as well

Alex Miller (Clojure team)03:02:48

Both are useful but they have trade offs


How do I take a vector of maps and turn it into a new vector of maps based on the maps in the first vector?