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
23 lines
493 B
Markdown
23 lines
493 B
Markdown
---
|
|
name: DropByIndex
|
|
slug: dropbyindex
|
|
sourceRef: it/seq.go#L581
|
|
category: it
|
|
subCategory: sequence
|
|
signatures:
|
|
- "func DropByIndex[T any, I ~func(func(T) bool)](collection I, indexes ...int) I"
|
|
playUrl: https://go.dev/play/p/vPbrZYgiU4q
|
|
variantHelpers:
|
|
- it#slice#drop
|
|
similarHelpers:
|
|
- core#slice#dropbyindex
|
|
- core#slice#withoutnth
|
|
position: 55
|
|
---
|
|
|
|
Removes elements from a collection at the specified indexes.
|
|
|
|
```go
|
|
result := it.DropByIndex(it.Range(1, 6), 1, 3)
|
|
// [1, 3, 5]
|
|
``` |