Fork me on GitHub
#core-async
<
2020-11-01
>
ghaskins23:11:35

Hi All, im struggling with something that is probably simple but im not seeing an obvious answer in the docs: I'd like the streaming equivalent of (take x (drop y coll)). I've been playing with async/transduce, async/pipeline, and async/take, but they alone do not seem to be quite what I needed. For instance, transduce of course buffers, pipeline is stateless, and I dont see the async/drop cousin to drop as I do for async/take -> take

ghaskins23:11:38

what am I missing?

ghaskins23:11:44

For instance, this logically does what I want:

(async/transduce
  (comp (take limit) (drop offset))
  conj
  [])
aside from the fact that the results are deferred until its complete

phronmophobic23:11:32

channels accept a transducer, is it possible to supply this transducer to your channel?