Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collection] .frequencies() method #258

Open
5pilow opened this issue Dec 7, 2019 · 1 comment
Open

[collection] .frequencies() method #258

5pilow opened this issue Dec 7, 2019 · 1 comment
Labels
easy Scope-limited issue, recommended for beginners feature New feature

Comments

@5pilow
Copy link
Member

5pilow commented Dec 7, 2019

Possible on every collection, constructs a map with elements as keys and number of occurrences as values.

[1, 1, 2, 3, 3].frenquencies() // [1: 2, 2: 1, 3: 2]
"abbacddd".frequencies() // ['a': 2, 'b': 2, 'c': 1, 'd': 3]
<1, 2, 3, 4>.frequencies() // [1: 1, 2: 1, 3: 1, 4: 1]
@5pilow 5pilow added feature New feature easy Scope-limited issue, recommended for beginners labels Dec 7, 2019
@NyalephTheCat
Copy link

histogram could be a good name too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Scope-limited issue, recommended for beginners feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants