Re: Transducers/Eduction problem

2015-06-30 Thread Alex Miller
Yep, that's my bug in the example. Will fix, sorry. -- 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.

Re: Transducers/Eduction problem

2015-06-30 Thread Ghadi Shayban
The example is wrong. There are now two flavors of support for reduce through interfaces, IReduce and IReduceInit. The first one allows you to call reduce without an initial value. Eduction doesn't support that interface, but only IReduceInit. Reduce without an initial value is now discoura

Transducers/Eduction problem

2015-06-30 Thread Вук Мировић
As Clojure 1.7 is finally released, I tried to wet my feet with transducers. I tried eduction example from official site http://clojure.org/transducers but it's not working: user=> (def xf (comp (filter odd?) (map inc))) #'user/xf user=> (def iter (eduction xf (range 5))) #'user/iter user=> (re