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
643 B
643 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RejectMap | rejectmap | slice.go#L550 | core | slice | https://go.dev/play/p/bmXhtuM2OMq |
|
|
270 |
|
Opposite of FilterMap: maps each item and includes results where the predicate returned false.
items := lo.RejectMap([]int{1, 2, 3, 4}, func(x int, _ int) (int, bool) {
return x * 10, x%2 == 0
})
// []int{10, 30}