DropWhile returns an Iterator adapter that drops elements from the underlying Iterator until pred predicate function returns true.
(it Iterator[T], pred func(T) bool)
| 227 | // DropWhile returns an Iterator adapter that drops elements from the underlying |
| 228 | // Iterator until pred predicate function returns true. |
| 229 | func DropWhile[T any](it Iterator[T], pred func(T) bool) Iterator[T] { |
| 230 | return &dropWhileIter[T]{ |
| 231 | inner: it, |
| 232 | pred: pred, |
| 233 | done: false, |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | func (it *dropWhileIter[T]) Next() Option[T] { |
| 238 | if !it.done { |
no outgoing calls
searching dependent graphs…