Fork me on GitHub
#aleph
<
2018-02-23
>
akiel16:02:13

I like to drain a stream into a vector without blocking. core.async has into which returns a channel. I look for a stream into which returns a deferred. stream->seq will block if I need the whole seq.

mccraigmccraig16:02:17

@akiel (stream/reduce conj [] <stream>) should do it

akiel16:02:00

oh there is a reduce - thanks!

mccraigmccraig16:02:29

there is transducer support too @akiel with stream/transform ... make sure you use a recent version though - there was a bug which bit me before 0.1.7-alpha6

akiel17:02:06

I use still 0.1.6 what was the problem?

mccraigmccraig17:02:35

it doesn't affect reduce ... just transform with transducers with state

akiel17:02:54

ok thanks