You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create function Count[T any](collection []T, predicate func (T) bool) int would return the number of elements for which the predicate returns true.
The text was updated successfully, but these errors were encountered:
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
Create function
Count[T any](collection []T, predicate func (T) bool) int
would return the number of elements for which the predicate returns true.The text was updated successfully, but these errors were encountered: