Fork me on GitHub
#core-async
<
2016-10-18
>
dadair04:10:38

one change to simplify could be (async/pipe source sink)

dadair05:10:21

and maybe (when-let [_ (async/<! pressure)] (async/pipe source sink) (recur))

dadair05:10:18

or rather (when (async/<! pressure) (async/pipe source sink) (recur)) since you don’t use the let binding

dadair05:10:49

actually I think you can ignore the (async/pipe ..), since I think that would allow stuff from source to pass through to sink ignoring the loop (after the first iteration), essentially creating a back channel

dhucerbin15:10:31

Hi, why take from core.async wasn't deprecated when transducers came? I see only minor differences between creating channel with take transducer and with take from core.async.

bcbradley18:10:37

@dhucerbin core.async/take allows you to specify an optional buffer size. I'm also pretty sure that clojure.core/take doesn't close the channel afterwards, while core.async/take does. Moreover, core.async/take! (exclamation point) doesn't behave like clojure.core/take at all.