hasNext {itertools} | R Documentation |
hasNext
is a generic function that indicates if the iterator
has another element.
hasNext(obj, ...)
## S3 method for class 'ihasNext'
hasNext(obj, ...)
obj |
an iterator object. |
... |
additional arguments that are ignored. |
Logical value indicating whether the iterator has a next element.
it <- ihasNext(iter(c('a', 'b', 'c')))
while (hasNext(it))
print(nextElem(it))