3 ms·
I'm still a little confused and will have to go over some code or something to really understand the limitations of what transducers can do... can any transduce
by kazagistar 12y ago
I'm still a little confused and will have to go over some code or something to really understand the limitations of what transducers can do... can any transducer be used in a "parallel" context (like map and filter) or are they limited to a linear context (like the fold makes me suspect)?
- mistaken 12y agoI think it could be parallelized by chunking up the input, however the transducer doesn't know how to do that by itself, so the step function would have to be modified somehow.
- jjcomer 12y agoExactly! core.async had the pipeline mechanism added which allows for the parallel application of a transducer to a channel. https://github.com/clojure/core.async/blob/17112aca9b07ebba6ce760ca01d117c24c80cc9a/src/main/clojure/clojure/core/async.clj#L500 https://github.com/clojure/core.async/blob/17112aca9b07ebba6...
- nickik 12y agoCheck out clojure reducers (http://clojure.org/reducers http://clojure.org/reducers) they are earlier work in the same line of thinking. The where used to do pmap style things. The same tricks can be used with trnasducers, but I dont think its implmented yet.