mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
482 B
482 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CountBy | countby | it/seq.go#L325 | it | find |
|
|
|
35 |
Counts the number of elements in the collection that satisfy the predicate.
result := it.CountBy(it.Range(1, 11), func(item int) bool {
return item%2 == 0
})
// 5