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
652 B
652 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Drop | drop | it/seq.go#L498 | it | sequence |
|
https://go.dev/play/p/O1J1-uWc3z9 |
|
|
100 |
Drops n elements from the beginning of a sequence.
Examples:
seq := func(yield func(int) bool) {
_ = yield(1)
_ = yield(2)
_ = yield(3)
_ = yield(4)
_ = yield(5)
}
dropped := it.Drop(seq, 2)
var result []int
for v := range dropped {
result = append(result, v)
}
// result contains 3, 4, 5