It will act exactly like transduce if you put a transducer on the input
channel.
On Wednesday, May 6, 2015 at 12:26:55 PM UTC-4, Pierre-Yves Ritschard wrote:
>
> Hi clojure,
>
> There's a thing I find myself doing often in some of my projects where
> I reduce over a core.async channel this way:
>
> (core.async/reduce update-fn init-state input-channel)
>
> By doing this on a stream of inbound events.
> When looking at doing this with transducers, it's a bit unclear how to fit
> the fact that I'm not doing any modification on the input-channel, do you
> usually just use identity there ?
>
> (transduce update-fn identity init-state input)
>
> Moving to a transducer based approach is tempting, especially since it
> would allow for a simpler REPL-based workflow, but I want to make sure I
> get this right.
>
> Cheers!
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.