transducers. I describe transducers
> briefly in this blog post:
> >
> > http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
> >
> > This work builds on the work done for reducers, bringing
> context-independent mapping, filtering etc to other areas, such as
&g
This is not safe usage, as you are not calling the 'flushing' method
or handle reduced objects. Correct use would be
(def xform (comp (filter odd?) (map #(* % %
(def strip-reduced [x] (if (reduced? x) @x x))
(let [r (xform conj)] (strip-reduced (r (strip-reduced (r #{1 2 3}
7) ;=> #{1 3 2
Some alternate transducers usage:
(def xform (comp (filter odd?) (map #(* % %
((xform conj) #{1 2 3} 7) ;=> #{1 3 2 49}
((xform conj) [1 2 3] 6) ;=> [1 2 3]
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo
ote:
>>
>>> I pushed today the initial work on transducers. I describe transducers
>>> briefly in this blog post:
>>>
>>> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>>>
>>> This work builds on the work done for r
rder?
>
>
> On Wednesday, August 6, 2014 8:01:24 PM UTC+2, Rich Hickey wrote:
>
>> I pushed today the initial work on transducers. I describe transducers
>> briefly in this blog post:
>>
>> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>>
>&g
t;
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>
> This work builds on the work done for reducers, bringing context-independent
> mapping, filtering etc to other areas, such as core.async.
>
> This is work in progress. We will be cutting alpha releases to help make it
>
both
cases exhibit the same execution order?
On Wednesday, August 6, 2014 8:01:24 PM UTC+2, Rich Hickey wrote:
>
> I pushed today the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-c
Oh dear, I still haven't understood the blogpost on reducers yet, and
now there is this one as well.
Phil
Rich Hickey writes:
> I pushed today the initial work on transducers. I describe transducers briefly
> in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/
even?))) to leverage parallelism ?
>
> On Wednesday, August 6, 2014 8:01:24 PM UTC+2, Rich Hickey wrote:
> I pushed today the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>
ay the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>
> This work builds on the work done for reducers, bringing
> context-independent mapping, filtering etc to other area
Thanks Rich!
Transducers, like all of your releases, are an eye opener.
I've always felt slightly hesitant to use core.async's version of sequence
functions, because of the overhead of intermediate channels. Then there was
the strictness tradeoff with reducers. All of that complexity, gone from m
th it for sure.
Cheers,
/thomas
On Wednesday, August 6, 2014 8:01:24 PM UTC+2, Rich Hickey wrote:
>
> I pushed today the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>
> Th
able to do such ret wrapping, am I right?
Best,
Jozef
On Wednesday, August 6, 2014 8:01:24 PM UTC+2, Rich Hickey wrote:
>
> I pushed today the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers
u get the choice eagerness (along with many other things).
>
>
>>
>> kl. 20:01:24 UTC+2 onsdag 6. august 2014 skrev Rich Hickey følgende:
>>>
>>> I pushed today the initial work on transducers. I describe transducers
>>> briefly in this blog post:
>&g
ng?
>
You get the choice eagerness (along with many other things).
>
> kl. 20:01:24 UTC+2 onsdag 6. august 2014 skrev Rich Hickey følgende:
>>
>> I pushed today the initial work on transducers. I describe transducers
>> briefly in this blog post:
>>
>> http:
misunderstanding something?
kl. 20:01:24 UTC+2 onsdag 6. august 2014 skrev Rich Hickey følgende:
>
> I pushed today the initial work on transducers. I describe transducers
> briefly in this blog post:
>
> http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
>
> This work builds
I pushed today the initial work on transducers. I describe transducers briefly
in this blog post:
http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming
This work builds on the work done for reducers, bringing context-independent
mapping, filtering etc to other areas, such as
17 matches
Mail list logo