core-async

ghaskins 2020-11-01T23:52:35.160100Z

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

ghaskins 2020-11-01T23:52:38.160300Z

what am I missing?

ghaskins 2020-11-01T23:57:44.161100Z

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

phronmophobic 2020-11-01T23:59:32.161600Z

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