It will be inconvenient to use transducer functions without the transducer
support added in 1.7.0, but there's nothing magical about transducers that
requires Clojure 1.7.
Core.async 0.1.346.0-17112a-alpha does not depend on clojure 1.7 (it only
depends on Clojure 1.6) and you don't need anything special to create a
transducing function. We use the transducer features of core.async with
Clojure 1.6 in production.
All you need to do is provide the core async channel with a function that
has the transducer structure: a function accepting a transforming-function
(supplied by core.async) and returning a function with three arities for
initialization, finalization, and the reduction step.
(fn [xf]
(fn
([] (xf))
([r] (xf r))
([r v] (xf r v)))
We use an as-transducer function as a convenience to make these:
https://gist.github.com/favila/ecdd031e22426b93a78f
On Monday, December 29, 2014 10:38:05 AM UTC-6, Udayakumar Rayala wrote:
>
> Hi,
>
> We are currently using clojure 1.6.0 and using async channels version
> "0.1.346.0-17112a-alpha".
> I see that the (chan) function accepts a transducers but transducers are
> not available in Clojure 1.6.0.
>
> Is there any option other than upgrading to Clojure 1.7.0-alpha4? If not,
> how safe it is right now to use Clojure 1.7.0-alpha4 in production? We
> really want to use transducers as it makes our code readable.
>
> Thanks,
> Uday.
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.