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

distinct() #152

Open
sanmai opened this issue Jun 15, 2024 · 0 comments
Open

distinct() #152

sanmai opened this issue Jun 15, 2024 · 0 comments
Labels
feature-request Feature request

Comments

@sanmai
Copy link
Owner

sanmai commented Jun 15, 2024

$numbers = Pipeline\fromValues(1, 2, 2, 3, 4, 4, 5);

$distinctNumbers = $numbers->distinct();

foreach ($distinctNumbers as $number) {
    echo $number . ', ';
}
// Output: 1, 2, 3, 4, 5,
@sanmai sanmai added the feature-request Feature request label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Feature request
Projects
None yet
Development

No branches or pull requests

1 participant