-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 Collection#subtract()
#8393
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
This should be called |
Actually, that method seems to already exist. |
The diagram in your PR description showed a difference operation, which made me think the function was implemented as a difference operation. As for the naming technically it's a "relative complement" because there's no concept of a universal set in our context. That being said, "complement" would be better because the lack of a universal set is implied. |
The problem here is that the existing |
Codecov Report
@@ Coverage Diff @@
## main #8393 +/- ##
==========================================
+ Coverage 85.61% 85.63% +0.02%
==========================================
Files 96 96
Lines 9459 9475 +16
Branches 1134 1137 +3
==========================================
+ Hits 8098 8114 +16
Misses 1319 1319
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Collection#missing()
Collection#complement()
Collection#complement()
Collection#subtract()
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
9230874
to
4f043a5
Compare
Please describe the changes this PR makes and why it should be merged:
This PR adds a new method. The subtract method returns a new structure containing items where the keys and values of original structure are not present in the other.
Visualization
Status and versioning classification: