mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
674 B
674 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FindDuplicatesBy | findduplicatesby | find.go#L234 | core | find | https://go.dev/play/p/LKdYdNHuGJG |
|
|
130 |
|
Returns a slice with the first occurrence of each duplicated element by key, preserving order.
lo.FindDuplicatesBy([]int{3, 4, 5, 6, 7}, func(i int) int {
return i % 3
})
// []int{3, 4}