Closed sbelak closed 6 years ago
@sbelak or even with core functions (assuming pred is stateless): ((filter pred) stats/count)
.
I'm slightly inclined towards this approach since it'll work with all the other reducing functions too, negating the implied requirement for mean-when
, etc.
Perhaps the README could be enhanced with a few cookbook-style examples along these lines?
Sure. That's why I flagged it, as I wasn't entirely sure it's the right way to do it.
Adds count when (not entirely sure sure if it's needed as the same functionality can be achieved with
(redux/with-xform stats/count (filter pred))
), but it's something I use quite often.