Skip to content

Add a tally goody #109

@miorel

Description

@miorel

Inspiration from Ruby: https://rubydoc.info/stdlib/core/Enumerable:tally
And Python: https://docs.python.org/3/library/collections.html#collections.Counter

Going with the Ruby name since it's a verb.

A reasonable place for it to live would be on Iterator.prototype, then anything that can give us an iterator can also be tallied.

Should we return a Map or an object? Either one could work, though a Map seems more future-looking, since it will support tallying something other than strings/numbers/Symbols.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttypescriptAdventure Pack TypeScript issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions