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

Add is empty method #133

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Add is empty method #133

merged 1 commit into from
Nov 5, 2023

Conversation

Jibaru
Copy link
Contributor

@Jibaru Jibaru commented Nov 5, 2023

A useful way to verify is a set is empty. Instead of using mySet.Cardinality() == 0, we can use mySet.IsEmpty(). Is simplest, but improve readability. Another way that I think to do that was with a helper function, like empty(mySet), but I tried to follow the current object-oriented approach.

This PR should close the issue #132

@deckarep
Copy link
Owner

deckarep commented Nov 5, 2023

Hi @Jibaru - thanks for the contribution! At first glance this looks good to me. Let me give it a closer look and if I don't see any issues I'll merge away.

-deckarep

@deckarep deckarep merged commit 208a228 into deckarep:main Nov 5, 2023
3 checks passed
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