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

feat: add bag data structure #1429

Merged
merged 2 commits into from
Aug 29, 2022
Merged

Conversation

hellerve
Copy link
Member

This PR adds a Bag data structure, which acts as a set (only storing each thing once) that keeps track of the number of times an item was put in the structure. It’s thus a deduplicated, unordered collection.

Test cases are included.

Cheers

@hellerve hellerve requested a review from a team August 26, 2022 12:47
@scolsen
Copy link
Contributor

scolsen commented Aug 26, 2022

Nice!

core/Map.carp Outdated Show resolved Hide resolved
@eriksvedang eriksvedang merged commit e4adef0 into carp-lang:master Aug 29, 2022
@hellerve hellerve deleted the hellerve/bags branch August 29, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants