OK, so would you say it's *not* good practice to do:
(r/reducer [1 2 3] (map f))
instead of
(r/map f [1 2 3])
because the former doesn't create a reducer that handles kv-reduction?
If so, it seems that `folder`/`reducer` are not fns intended for public
consumption, since `rfn` is private an
This is a place where reducers and transducers diverge. Transducers don't
have support for automatic kv reducing (there are some tricky details as to
why this was possible in reducers but not as easy in transducers, which I
mostly don't remember at this point). That is an area of possible future
I think this is one of those cases where I need to see an example to
understand.
>From what I can tell, the `(fn [f1] (rfn ...))` argument to `folder` is a
reducing-function-transformer--i.e. transducer, except there are some
differences in things like order of application in composition. I *do
Reducers combine functionally, so they all have to support it to create any
composite reducer that contains map.
On Thursday, May 18, 2017 at 10:11:23 PM UTC-5, Tianxiang Xiong wrote:
>
> Would that ever be the case for `r/map`? Or does it only apply to certain
> other reducers?
>
> On Thursday,
Would that ever be the case for `r/map`? Or does it only apply to certain
other reducers?
On Thursday, May 18, 2017 at 4:11:39 PM UTC-7, Alex Miller wrote:
>
> The 3 arity is used when reducing over a map, like reduce-kv. Reducers do
> this automatically which varies from the core reduce.
--
Y