Fork me on GitHub

i've been using kixi.stats a little bit and i'm curious if there's any obvious reason why that library doesn't wrap it's reducing fns to provide a non-transducer interface as well, so you can just get the mean of collection, instead of having to (transduce identity mean (range 10))


@U064UGEUQ I have considered introducing a basic API but never followed through because those functions wouldn’t compose in the useful way reducing functions do, and they’re so trivially constructed in client code e.g. (def my-mean (partial transduce identity kixi/mean)). Worth noting also that there are other libraries that will calculate seq > stat more efficiently than kixi.stats if you don’t need the flexibility of reducing functions.

👍 8

it seems like both cases are useful at different times and it would be convenient to have both be based on the same code, but transducing everywhere feels a little awkward, as does wrapping things in user land