MCPcopy Create free account
hub / github.com/Soft/iter / Drop

Function Drop

iterator.go:201–206  ·  view source on GitHub ↗

Drop returns an Iterator adapter that drops the first n elements from the underlying Iterator before yielding any values.

(it Iterator[T], n uint)

Source from the content-addressed store, hash-verified

199// Drop returns an Iterator adapter that drops the first n elements from the
200// underlying Iterator before yielding any values.
201func Drop[T any](it Iterator[T], n uint) Iterator[T] {
202 return &dropIter[T]{
203 inner: it,
204 drop: n,
205 }
206}
207
208func (it *dropIter[T]) Next() Option[T] {
209 v := None[T]()

Callers 1

TestDropFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDropFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…