I would consider statistics
to have similarities - median, mean etc are aggregate functions.
Not really, more like reduce, actually -/ you get a single result.
are also doing something similar to grouping.
.(Yes, a few statistics apply to
nominal and ordinal data too,
And for that, a generic grouping function could be used.
In fact, allowing Counter to be used as the accumulater was one suggestion in this thread, and would build s histogram.
Now that I think about it, you could write a key function that built a histogram for continuous data as well.
Though that might be a bit klunky.
But if someone thinks that’s a good idea, a PR for an example would be accepted: