Fork me on GitHub

Hi. The core.async doc states that clojure.core.async/pipeline: > Takes elements from the from channel and supplies them to the to > channel, subject to the transducer xf, with parallelism n. Because > it is parallel, the transducer will be applied independently to each > element, not across elements, **and may produce zero or more outputs > per input. Outputs will be returned in order relative to the > inputs. In my understanding it should be possible to return some kind of seq and each entry will be supplied to the to channel instead of the returned seq as one message. Does anyone have an example on how to achieve this? Is there some builtin transducing function which can be applied to the channel to partition the seq (`(partition-all 1)` did not work for some reason either)?

Alex Miller (Clojure team)21:03:52

the way to produce multiple outputs in pipeline is with an expanding transducer (like mapcat)