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

Sets & maps append-multi. Also docs and a fix for SortedSets #35

Merged
merged 4 commits into from
Jan 2, 2023

Conversation

laher
Copy link
Contributor

@laher laher commented Dec 28, 2022

Finishing touches for #32 . Mainly docs and appending multiple items at once.

Set/SortedSet

  • varargs (as with recent PR for Lists)
  • docs: readme and godoc
  • SortedSet only: rename Put() to Set(), in line with the other types' methods. (I originally had both Set.Put(...) too, but forgot to update SortedSet in line with Set)
  • Items() returns a slice of the set contents.

Map/SortedMap

This is similar to the Varargs for sets / lists. You can't really do varargs in the same way (unless you added an Entry type, but it would be clunky IMO), so I just added separarate funcs which take a map[K]V instead.

  • NewMapOf(Hasher, map[K]v) / NewSortedMapOf(Comparer, map[K]v)
  • SetMany(map[K]v)

@laher laher mentioned this pull request Dec 28, 2022
@benbjohnson benbjohnson merged commit 4dd1fd8 into benbjohnson:master Jan 2, 2023
@laher laher deleted the sets-maps-append-multi branch January 3, 2023 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants