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: add find and findLast functions #28

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

Bl00D4NGEL
Copy link
Collaborator

A user of this library might be looking for a function to find the first (or last) element that matches a predicate while not wanting to provide a default. If that is the case a user currently has to call $collection->firstOr($callback) or $collection->lastOr($callback). Instead we should provide a find and findLast function that does exactly that.

@Bl00D4NGEL Bl00D4NGEL requested a review from b00gizm as a code owner January 30, 2024 12:56
@Bl00D4NGEL Bl00D4NGEL merged commit 337df9b into geekcell:main Feb 9, 2024
1 check 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