Back to Lo

It Drop

docs/data/it-drop.md

1.53.0324 B
Original Source

Drops n elements from the beginning of a sequence.

Examples:

go
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