mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
545 B
545 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| UniqBy | uniqby | it/seq.go#L225 | it | sequence |
|
https://go.dev/play/p/HKrt3AvwMTR |
|
|
45 |
Returns a sequence with duplicate elements removed based on a transform function.
result := it.UniqBy(it.Range(1, 7), func(item int) int {
return item % 3
})
// [1, 2, 3]