Skip to content

feat: ✨ implement xor for collections#48

Open
ghostsquad wants to merge 1 commit intosamber:masterfrom
ghostsquad:feat/xor
Open

feat: ✨ implement xor for collections#48
ghostsquad wants to merge 1 commit intosamber:masterfrom
ghostsquad:feat/xor

Conversation

@ghostsquad
Copy link
Copy Markdown

Note: this depends on a test helper function I've added in another pr: prettyFormatSlice

@ghostsquad
Copy link
Copy Markdown
Author

@samber any interest in getting this merged?

@ghostsquad ghostsquad closed this Mar 27, 2026
@ghostsquad ghostsquad deleted the feat/xor branch March 27, 2026 03:58
@ghostsquad ghostsquad restored the feat/xor branch March 27, 2026 03:59
@ghostsquad ghostsquad reopened this Mar 27, 2026
@ghostsquad
Copy link
Copy Markdown
Author

@samber this PR has been updated, and is ready for re-review.

Xor is the logical inverse of Intersect.
Xor returns an array of unique values that is the symmetric difference of the given slices.
The order of result values is determined by the order they occur in the slices.
Also known as the symmetric difference of two sets or the disjunctive union.

ref: https://en.wikipedia.org/wiki/Symmetric_difference
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.

1 participant