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

feat(stdlib): Add isEmpty to List module #1860

Merged
merged 3 commits into from
Jun 25, 2023

Conversation

spotandjake
Copy link
Member

This pr adds List.isEmpty bringing the api inline with the other data types. This is beneficial for List especially as the common way of checking if a List is empty is List.length(i) == 0 which in the case of list would have to iterate the entire list to calculate the length.

closes: #1784

Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice little helper function!

@spotandjake spotandjake changed the title feat: Add List.isEmpty feat(stdlib): Add isEmpty to List module Jun 14, 2023
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect PR on first try. Delightful 🎉

@phated phated added this pull request to the merge queue Jun 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 15, 2023
@phated phated added this pull request to the merge queue Jun 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 15, 2023
@phated phated added this pull request to the merge queue Jun 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 15, 2023
@phated phated added this pull request to the merge queue Jun 25, 2023
Merged via the queue into grain-lang:main with commit 7362189 Jun 25, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add List isEmpty
4 participants