Files
lo/docs/data/core-withoutnth.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

27 lines
547 B
Markdown

---
name: WithoutNth
slug: withoutnth
sourceRef: intersect.go#L223
category: core
subCategory: intersect
playUrl: https://go.dev/play/p/AIro-_UtL9c
variantHelpers:
- core#intersect#withoutnth
similarHelpers:
- core#intersect#without
- core#intersect#withoutby
- core#slice#dropbyindex
position: 140
signatures:
- "func WithoutNth[T comparable, Slice ~[]T](collection Slice, nths ...int) Slice"
---
Returns a slice excluding the elements at the given indexes.
```go
lo.WithoutNth([]int{-2, -1, 0, 1, 2}, 3)
// []int{-2, -1, 0, 2}
```