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

fix: pure/set revise insert delete return types to (Set<T>, Bool), not ?Set<T> #177

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

crusso
Copy link
Contributor

@crusso crusso commented Feb 26, 2025

This is more symmetric with the imperative insert/delete and easier to use when you still want to work with the set even if unchanged.

@crusso crusso requested a review from a team as a code owner February 26, 2025 11:47
@crusso crusso changed the base branch from main to claudio/pure-set February 26, 2025 11:47
@crusso crusso mentioned this pull request Feb 26, 2025
11 tasks
@crusso crusso merged commit ef433b9 into claudio/pure-set Feb 26, 2025
4 checks passed
@crusso crusso deleted the claudio/pure-set-revised-insert-delete branch February 26, 2025 16:30
Copy link

No description provided.

crusso added a commit that referenced this pull request Feb 26, 2025
* import OrderedSet

* initial port of OrderedMap

* port OrderedSet

* port OrderSet.prop.test

* fix Set.toText

* fix test

* rename pure/OrderedSet to pure/Set

* implement compare, forEach, filter

* test compare

* test forEach/filter

* implement and test join/flatten

* harmonize Map/Set.equals functions to take a comparison for the key/element type. This will support future optimization even if we don't exploit the ordering just yet (pure/Set.equals does, however).

* restore  optimization in Set.mo (using imperative Lists)

* settle on non-trappring add/remove, insert/delete

* rename pure/Set.intersection/difference

* revise pure/Set.insert/delete to return (Set<T>, Bool) not ?Set<T> (#177)

* revalidate
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