Suggestion Add Rubys tally

217 views
Skip to first unread message

Osawa QWYNG

unread,
Sep 30, 2019, 11:16:17 AM9/30/19
to elixir-lang-core

Hi! Thank you for a great programing language.
This is a suggestion for a new enum function.


Add tally function like Rubys tally.


tally is Rubys 2.7.0 new function

https://bugs.ruby-lang.org/issues/11076


and this is My PR for Elixir

https://github.com/elixir-lang/elixir/pull/9373


iex> Enum.tally(~w{ant buffalo ant ant buffalo dingo})
%{"ant" => 3, "buffalo" => 2, "dingo" => 1}

iex> Enum.tally(~w{aa aA bb cc}, fn x -> String.downcase(x) end)
%{"aa" => 2, "bb" => 1, "cc" => 1}


The following article is more about this.

https://medium.com/@baweaver/ruby-2-7-enumerable-tally-a706a5fb11ea


Ruby 2.7.0 has not released yet but this function is really good

Ben Wilson

unread,
Sep 30, 2019, 12:56:12 PM9/30/19
to elixir-lang-core
This function is really good as an exercise for new programmers to implement, for sure. In terms of regular workflows, how often does this exact function really come up? Given that it's only three lines to implement, I'm not sure that adding it to the standard library contributes much towards solving people's problems.

Wojtek Mach

unread,
Sep 30, 2019, 12:57:26 PM9/30/19
to elixir-l...@googlegroups.com
As I mentioned on the linked PR, I’m in favor of such feature. I like how Clojure calls this function: frequencies. Thus if we are considering Enum.frequencies/1 and/or Enum.frequencies/2, it has my vote.

To move the proposal forward I think it would be very valuable if you could survey other programming languages to see if they have such feature and if so - under what function name.

Paul Byrne

unread,
Sep 30, 2019, 1:20:15 PM9/30/19
to elixir-l...@googlegroups.com
Most occasions I've needed to do this kind of count, I've been trying to get some data through the production console, rather than it being some business logic, to get a sense of how often some data problem has occurred.

Given that I think it's a rather nice addition to the toolbox. It's certainly generic enough, though possibly too niche.

Paul

On Mon, Sep 30, 2019, 12:57 Wojtek Mach <woj...@wojtekmach.pl> wrote:
As I mentioned on the linked PR, I’m in favor of such feature. I like how Clojure calls this function: frequencies. Thus if we are considering Enum.frequencies/1 and/or Enum.frequencies/2, it has my vote.

To move the proposal forward I think it would be very valuable if you could survey other programming languages to see if they have such feature and if so - under what function name.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/1ACBE99E-BE36-4035-991C-9BD03651048C%40wojtekmach.pl.

Allen Madsen

unread,
Sep 30, 2019, 1:35:46 PM9/30/19
to elixir-l...@googlegroups.com
I think the problem with including this in the core library is that you can end up with very different implementations depending on what your use case is. So, if it were included in the standard library, it would need to be explicit about when to use it and when not to.

The version provided in the PR is memory inefficient, because it first does a group by, which requires it to retain every element in the collection. For simple, use cases that may be fine, but if you're streaming a large amount of data, you probably only want to keep track of the counts. If you're keeping track of the counts, you're probably being inefficient speed wise, because you're constantly updating the accumulator map for each item in the collection. To do that efficiently, you probably want to use an ETS table. But, do you really want an ETS table to be created any time you call this function?

OvermindDL1

unread,
Sep 30, 2019, 6:36:56 PM9/30/19
to elixir-lang-core
I prefer the name `frequency` as well, however I would vote not to include it.  It is trivial enough just type it inline where needed as it as and it would not be used often-enough to be worth inclusion I think.  Perhaps as another library for now?


On Monday, September 30, 2019 at 11:35:46 AM UTC-6, Allen Madsen wrote:
I think the problem with including this in the core library is that you can end up with very different implementations depending on what your use case is. So, if it were included in the standard library, it would need to be explicit about when to use it and when not to.

The version provided in the PR is memory inefficient, because it first does a group by, which requires it to retain every element in the collection. For simple, use cases that may be fine, but if you're streaming a large amount of data, you probably only want to keep track of the counts. If you're keeping track of the counts, you're probably being inefficient speed wise, because you're constantly updating the accumulator map for each item in the collection. To do that efficiently, you probably want to use an ETS table. But, do you really want an ETS table to be created any time you call this function?

On Mon, Sep 30, 2019 at 1:20 PM Paul Byrne <paulgreg...@gmail.com> wrote:
Most occasions I've needed to do this kind of count, I've been trying to get some data through the production console, rather than it being some business logic, to get a sense of how often some data problem has occurred.

Given that I think it's a rather nice addition to the toolbox. It's certainly generic enough, though possibly too niche.

Paul

On Mon, Sep 30, 2019, 12:57 Wojtek Mach <woj...@wojtekmach.pl> wrote:
As I mentioned on the linked PR, I’m in favor of such feature. I like how Clojure calls this function: frequencies. Thus if we are considering Enum.frequencies/1 and/or Enum.frequencies/2, it has my vote.

To move the proposal forward I think it would be very valuable if you could survey other programming languages to see if they have such feature and if so - under what function name.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-l...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-l...@googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Osawa QWYNG

unread,
Sep 30, 2019, 9:52:53 PM9/30/19
to elixir-lang-core

Osawa QWYNG

unread,
Sep 30, 2019, 9:56:43 PM9/30/19
to elixir-lang-core
frequency sounds good!
I also have tried to get some data through the production console

PHP has a similar method

May I update My PR? 


2019年10月1日火曜日 0時16分17秒 UTC+9 Osawa QWYNG:

Hi! Thank you for a great programing language.

Chris

unread,
Oct 4, 2019, 12:49:50 PM10/4/19
to elixir-l...@googlegroups.com
I like it!

Either frequency or tally works for me, though I'd suggest "tally" since it's a verb and you never "frequency" up a list of different occurrences.

It looks like a simple and useful addition to the standard library.

For folks complaining about streaming or other issues--a simple note on the docs saying "hey, this can be obnoxious on really large sets" seems reasonable. There are dozens of footguns lying around for people that don't know better in any programming language, no reason to inconvenience ourselves out of concern that somebody might do something suboptimal.

On Tue, Oct 1, 2019 at 12:14 PM Osawa QWYNG <ikus...@gmail.com> wrote:

frequency sounds good! 

I also have tried to get some data through the production console.

PHP has a similar method

May I update My PR?

2019年10月1日火曜日 7時36分56秒 UTC+9 OvermindDL1:
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/0e4dc6bc-4654-4698-b8a9-cc9b0782bbbc%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

José Valim

unread,
Oct 4, 2019, 8:55:58 PM10/4/19
to elixir-l...@googlegroups.com
So I am not a native speaker, but “tally” sounds very foreign to me. Is it used frequently? I am afraid an uncommon name won’t help with readability/discovery. Is there a reason why it is not called count_by? It seems it was first proposed as such to Ruby. Thank you for the proposal!
--


José Valim
Skype: jv.ptec
Founder and Director of R&D

Bruce Tate

unread,
Oct 4, 2019, 9:55:23 PM10/4/19
to elixir-l...@googlegroups.com
Count by is excellent. Better than either of the alternatives. 

-bt

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.


--

Regards,
Bruce Tate
CEO

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Paul Byrne

unread,
Oct 5, 2019, 4:09:35 AM10/5/19
to elixir-l...@googlegroups.com
tally is a bit like score, used to talk about games. It is not super common in day to day english. count_by sounds more accurate. I like it.

Greg Vaughn

unread,
Oct 5, 2019, 11:18:08 AM10/5/19
to elixir-l...@googlegroups.com
"Tally" is not used often, but it does precisely and concisely describe the function. For more reference, those 4 vertical lines with a slash across them to represent 5 are known as "tally marks" (see https://en.wikipedia.org/wiki/Tally_marks). Also, if this were in our standard library, I would always think of Harry Belafonte's _Day-O_ song and smile when I use it ("come mister tally man, tally me banana") (https://www.youtube.com/watch?v=6Tou8-Cz8is)

-Greg Vaughn
> --
> You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KqUJKyuD0CSe5gTHL761SR6CncKDD1ryTsHTuRWXFN8g%40mail.gmail.com.

Louis Pilfold

unread,
Oct 5, 2019, 12:28:52 PM10/5/19
to elixir-lang-core
I'm a native English speaker and count_by is clearer to me than tally, which I would think of as a way of counting using tally marks without any relation to grouping items before counting.

I also like that the name count_by matches group_by, which has similar behaviour.

Cheers,
Louis

eksperimental

unread,
Oct 5, 2019, 2:09:32 PM10/5/19
to elixir-l...@googlegroups.com
The problem I have with Enum.count_by/2 is that I wouldn't be able just by looking at the name to
tell it apart from Enum.count/2 which takes a function as a second argument

How will this function work with enumerables other than lists? the way it currently does is correct?

iex(6)> Enum.tally %{a: 1, b: 2}
%{{:a, 1} => 1, {:b, 2} => 1}


On Fri, 4 Oct 2019 21:55:09 -0400
Bruce Tate <br...@grox.io> wrote:

> Count by is excellent. Better than either of the alternatives.
>
> -bt
>
> On Fri, Oct 4, 2019 at 8:55 PM José Valim <jose....@plataformatec.com.br>
> wrote:
>
> > So I am not a native speaker, but “tally” sounds very foreign to me. Is it
> > used frequently? I am afraid an uncommon name won’t help with
> > readability/discovery. Is there a reason why it is not called count_by? It
> > seems it was first proposed as such to Ruby. Thank you for the proposal!
> > --
> >
> >
> > *José Valim*
> > www.plataformatec.com.br
> > Skype: jv.ptec
> > Founder and Director of R&D
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "elixir-lang-core" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to elixir-lang-co...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KqUJKyuD0CSe5gTHL761SR6CncKDD1ryTsHTuRWXFN8g%40mail.gmail.com
> > <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KqUJKyuD0CSe5gTHL761SR6CncKDD1ryTsHTuRWXFN8g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
>
>

eksperimental

unread,
Oct 5, 2019, 2:31:47 PM10/5/19
to elixir-l...@googlegroups.com
Enum.group_count/2 would be a name that describe better what this function does IMO, but it
wouldn't work as Enum.group_by/3 since this one groups by key, and group_count would group by
elements ({key, value})

OvermindDL1

unread,
Oct 7, 2019, 12:07:33 PM10/7/19
to elixir-lang-core
`Enum.group_count` I also like, seems most accurate and fitting in the current API.


On Saturday, October 5, 2019 at 12:31:47 PM UTC-6, eksperimental wrote:
Enum.group_count/2 would be a name that describe better what this function does IMO, but it
wouldn't work as Enum.group_by/3 since this one groups by key, and group_count would group by
elements ({key, value})

On Sun, 6 Oct 2019 01:09:06 +0700
eksperimental <eksper...@autistici.org> wrote:

> The problem I have with Enum.count_by/2 is that I wouldn't be able just by looking at the name to
> tell it apart from Enum.count/2 which takes a function as a second argument
>
> How will this function work with enumerables other than lists? the way it currently does is
> correct?
>
>     iex(6)> Enum.tally %{a: 1, b: 2}  
>     %{{:a, 1} => 1, {:b, 2} => 1}
>
>
>  On Fri, 4 Oct 2019 21:55:09 -0400
> Bruce Tate <br...@grox.io> wrote:
>
> > Count by is excellent. Better than either of the alternatives.
> >
> > -bt
> >
> > On Fri, Oct 4, 2019 at 8:55 PM José Valim <jose...@plataformatec.com.br>
> > wrote:
> >  
> > > So I am not a native speaker, but “tally” sounds very foreign to me. Is it
> > > used frequently? I am afraid an uncommon name won’t help with
> > > readability/discovery. Is there a reason why it is not called count_by? It
> > > seems it was first proposed as such to Ruby. Thank you for the proposal!
> > > --
> > >
> > >
> > > *José Valim*
> > > www.plataformatec.com.br
> > > Skype: jv.ptec
> > > Founder and Director of R&D
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "elixir-lang-core" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an
Message has been deleted
Message has been deleted

Bruce Tate

unread,
Oct 8, 2019, 1:05:43 PM10/8/19
to elixir-l...@googlegroups.com
I like it. I like the name tally, but frequency works too. 

-bt

Osawa QWYNG

unread,
Oct 8, 2019, 6:20:58 PM10/8/19
to elixir-l...@googlegroups.com
srry my old messages posted now.....

2019年10月9日(水) 2:05 Osawa QWYNG <ikus...@gmail.com>:
count_by is the first name in ruby's tally proposal.
However, it was changed to tally as "quite well to me what this method does and avoids clashing with group or count."
Of course, count_by is good too.

2019年10月1日火曜日 0時16分17秒 UTC+9 Osawa QWYNG:

Hi! Thank you for a great programing language.
This is a suggestion for a new enum function.


Add tally function like Rubys tally.


tally is Rubys 2.7.0 new function

https://bugs.ruby-lang.org/issues/11076


and this is My PR for Elixir

https://github.com/elixir-lang/elixir/pull/9373


iex> Enum.tally(~w{ant buffalo ant ant buffalo dingo})
%{"ant" => 3, "buffalo" => 2, "dingo" => 1}

iex> Enum.tally(~w{aa aA bb cc}, fn x -> String.downcase(x) end)
%{"aa" => 2, "bb" => 1, "cc" => 1}


The following article is more about this.

https://medium.com/@baweaver/ruby-2-7-enumerable-tally-a706a5fb11ea


Ruby 2.7.0 has not released yet but this function is really good

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/hBRKIIy8QKE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/24503dd9-13ea-4636-88f7-dc2555a869db%40googlegroups.com.

José Valim

unread,
Oct 8, 2019, 9:38:50 PM10/8/19
to elixir-l...@googlegroups.com
Yes, no worries. The mailing list sometimes holds messages per days and only then publishes them.


José Valim
Skype: jv.ptec
Founder and Director of R&D
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CADfR9tHCPn0MtRRF5D30CCDnAydq3HM-JTfUVzyV3Gc110e0hg%40mail.gmail.com.

José Valim

unread,
Oct 17, 2019, 4:07:56 PM10/17/19
to elixir-lang-core
Hi Osawa,

Please send a pull request for Enum.count_by:

iex> Enum.count_by(~w{aa aA bb cc}, fn x -> String.downcase(x) end)
%{"aa" => 2, "bb" => 1, "cc" => 1}

It is meant to mirror group_by.

If someone has an objection against count_by, please let us know.

OvermindDL1

unread,
Oct 17, 2019, 6:43:14 PM10/17/19
to elixir-lang-core
I personally think the `count_by` name implies some other operation then a grouped count (to me I'd expect an RLE style count), I like the prior mentioned `group_count_by` or `group_count`.

José Valim

unread,
Oct 17, 2019, 6:44:50 PM10/17/19
to elixir-l...@googlegroups.com
Can you please expand what would be a RLE style count?

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
--

OvermindDL1

unread,
Oct 17, 2019, 7:01:26 PM10/17/19
to elixir-lang-core
Like given a list like:
```
[1, 1, 1, 2, 2, 2, 2, 3, 3, 1, 1, 4, 4]
```
I'd expect it to return:
```
[{1, 3}, {2, 4}, {3, 2}, {1, 2}, {4, 2}]
```

This is similar to similar named functions in some other languages I use though, so I am bias'ed that way

(Technically `group_by` is misnamed in Elixir as well for what I'm generally used to, I'm used to such a function being called `group_map` to do the same thing, where `group_by` does RLE style grouping as well, where `[1, 1, 1, 2, 2, 2, 2, 3, 3, 1, 1, 4, 4]` would actually return `[[1, 1, 1], [2, 2, 2, 2], [3, 3], [1, 1], [4, 4]]`.  Elixir is a bit of an oddity with a lot of naming conventions compared to what I'm used to.)

On Thursday, October 17, 2019 at 4:44:50 PM UTC-6, José Valim wrote:
Can you please expand what would be a RLE style count?
On Fri, Oct 18, 2019 at 00:43 OvermindDL1 <overm...@gmail.com> wrote:
I personally think the `count_by` name implies some other operation then a grouped count (to me I'd expect an RLE style count), I like the prior mentioned `group_count_by` or `group_count`.

On Thursday, October 17, 2019 at 2:07:56 PM UTC-6, José Valim wrote:
Hi Osawa,

Please send a pull request for Enum.count_by:

iex> Enum.count_by(~w{aa aA bb cc}, fn x -> String.downcase(x) end)
%{"aa" => 2, "bb" => 1, "cc" => 1}

It is meant to mirror group_by.

If someone has an objection against count_by, please let us know.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-l...@googlegroups.com.

OvermindDL1

unread,
Oct 17, 2019, 7:03:38 PM10/17/19
to elixir-lang-core
To be specific, the `_by` part of these imply they would take a function to me as well, which I'm assuming for all these cases to just be the identity function for keeping the example simple.

On a side note, I would really like a more proper `group_by` function that is RLE based, though unsure what to call it since `group_by` is already taken?

Osawa QWYNG

unread,
Oct 17, 2019, 7:40:23 PM10/17/19
to elixir-l...@googlegroups.com
May I sent PR with group_count_by?
I think that's nice too.

2019年10月18日(金) 8:03 OvermindDL1 <overm...@gmail.com>:
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/0796f1bd-afa8-4cbd-b308-180371e9358c%40googlegroups.com.

Kelvin Raffael Stinghen

unread,
Oct 17, 2019, 8:01:49 PM10/17/19
to elixir-l...@googlegroups.com
I also think that the name `count_by` does not describe it well. It looks like a function that receives a function to filter in which items to count. Like in:

   iex> Enum.count_by(1..10, &rem(&1, 2))
   5

`group_count_by` is clearer IMO. But maybe `count_group_by` is more semantically correct, since “group count” seems like “the quantity of groups”.

Best,
Kelvin Stinghen
kelvin....@me.com

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.

Osawa QWYNG

unread,
Oct 17, 2019, 8:05:52 PM10/17/19
to elixir-l...@googlegroups.com
count_group_by is more like SQL syntax.
Very Good!

2019年10月18日(金) 9:01 Kelvin Raffael Stinghen <kelvin....@gmail.com>:
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/A0FD01DF-3FB1-4282-8C7D-676F55241558%40gmail.com.

José Valim

unread,
Oct 17, 2019, 8:18:03 PM10/17/19
to elixir-l...@googlegroups.com
I am not a big fan of group_count/1 and group_count_by/2 because it starts to nudge us in the direction of group_min, group_min_by, and friends.

Perhaps frequencies/1 and frequencies_by/2 works best (assuming it is clearer than tally). It at least matches better with min/max/sum, which are nouns?
--

Osawa QWYNG

unread,
Oct 17, 2019, 8:30:42 PM10/17/19
to elixir-l...@googlegroups.com
OK, I see.
I'll create PR frequencies/1 and frequencies_by/2

2019年10月18日(金) 9:18 José Valim <jose....@plataformatec.com.br>:
> --
> You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Kf%2BG4uqa5Arf1WKEn00ksQfpMJNQfig1jJksV5vANg7g%40mail.gmail.com.

Kelvin Raffael Stinghen

unread,
Oct 18, 2019, 7:23:02 AM10/18/19
to elixir-l...@googlegroups.com
Frequencies is a good name too. :D

Best,
Kelvin Stinghen
Kelvin....@me.com

Sent from my iPhone
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CADfR9tF5rdPxMKQ_%2B-4La75b%3DgjEGN_14cAHBPCnv%2Bg_qc0J5A%40mail.gmail.com.

eksperimental

unread,
Oct 19, 2019, 9:37:26 PM10/19/19
to elixir-l...@googlegroups.com
The problem that I have with "frequencies" is that it means RATE over a PERIOD of time or some
other unit.
I like the move to a function name that uses nouns, instead of verbs.
I think we should speak more of "repetition", "recurrence" or "occurrences", "instances"
my two cents

Derek Kraan

unread,
Oct 20, 2019, 1:47:40 AM10/20/19
to 'boris kotov' via elixir-lang-core
Oxford dictionary defines frequency as: the rate at which something occurs over a particular period of time or in a given sample.

In this case, the input is the given sample. So the proposed usage is consistent with the dictionary definition of the word (and my own intuition as a native speaker).
-- 
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.

José Valim

unread,
Oct 20, 2019, 1:52:49 AM10/20/19
to elixir-l...@googlegroups.com
Thanks Eksperimental and Derek!

Derek, In any case, would repetitions or occurrences be better definitions?

Derek Kraan

unread,
Oct 20, 2019, 2:10:25 AM10/20/19
to 'boris kotov' via elixir-lang-core
Intuitively, "frequencies" seems like the better option to me. Repetitions and occurrences are also a bit hazy in terms of their definitions. While "frequency" is the "rate", (or "count"), the intended meaning of "occurrence" is stated in terms of frequency (Oxford): "the fact or frequency of something happening." (And there are other definitions). Repetition simply means "the recurrence of an action or event."

In my opinion "repetitions" doesn't convey "count of repetitions", and while "occurrences" does seem to work, "frequencies" has fewer alternative definitions to compete with and is in my opinion easier to understand.

I should also note that "frequency" is also a noun. I'm not sure if eksperimental meant otherwise, just stating for clarification.

Greg Vaughn

unread,
Oct 20, 2019, 11:48:36 AM10/20/19
to elixir-l...@googlegroups.com
I still like `tally` (both a noun and verb) but I'm probably the only one.

`frequencies` is the only other name I like. No one has mentioned `histogram` which I also like.

-Greg Vaughn
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BWeU%2BYTr-8kK92xD9fTn9PrEgQXGuxs%2BiQC5tcJi1g1w%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages