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 Count function to count number of elements of a slice that statisfy a predicate #55

Closed
CorentinClabaut opened this issue Mar 21, 2022 · 0 comments · Fixed by #75
Closed

Comments

@CorentinClabaut
Copy link
Contributor

Create function Count[T any](collection []T, predicate func (T) bool) int would return the number of elements for which the predicate returns true.

@CorentinClabaut CorentinClabaut changed the title Add Count for reducing to bool Add Count function to count number of elements of a slice that statisfy a predicate Mar 21, 2022
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 a pull request may close this issue.

1 participant