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

Set + SortedSet with tests #34

Merged
merged 1 commit into from
Dec 26, 2022
Merged

Set + SortedSet with tests #34

merged 1 commit into from
Dec 26, 2022

Conversation

laher
Copy link
Contributor

@laher laher commented Dec 24, 2022

See #32 . As I mentioned there, I already wrote this earlier. It's really just a convenience wrapper, but it seems desirable IMO.

  • Note that I probably wouldn't bother with the SetBuilder/SortedSetBuilder if I were implementing varargs as in List: varargs for Append,Prepend,NewList #33 . I haven't added them here yet, but I think it makes sense to.
  • I also haven't added Union/Difference/Intersection/Complement, but it seems like something we'd want on a set.

For both those things, I figure it's worth discussing first. e.g. Do you even want a set to exist in the package?

@benbjohnson
Copy link
Owner

Yeah, I think Set and SortedSet are nice API sugar. The struct{} values are kinda lame from an API standpoint and these types could probably be optimized in the future to remove the values internally entirely.

@benbjohnson benbjohnson merged commit 92be7cb into benbjohnson:master Dec 26, 2022
@benbjohnson
Copy link
Owner

I went ahead and tagged your last 2 PRs into a release: https://github.com/benbjohnson/immutable/releases/tag/v0.4.2

@laher laher deleted the sets branch December 26, 2022 23:48
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