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

propose: Add First() on slice, empty to return nil #437

Closed
justfunxin opened this issue Mar 14, 2024 · 3 comments
Closed

propose: Add First() on slice, empty to return nil #437

justfunxin opened this issue Mar 14, 2024 · 3 comments

Comments

@justfunxin
Copy link

No description provided.

@freeeverett
Copy link

When the null value is not nil, I think the function cannot be implemented. Is there any way to implement the function?

@Alireza-Kiani
Copy link
Contributor

Hey there, just created a pull request similar to what you need #451.
Returning zero value instead of nil is just more compatible with the conventions

@shivamrazorpay
Copy link
Contributor

@kangarooxin as the issue is fixed, i think you can close it.

@samber samber closed this as completed Jul 26, 2024
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

No branches or pull requests

5 participants