ihasNext: Create an iterator that supports the hasNext method

Description Usage Arguments Value Examples

Description

ihasNext is a generic function that indicates if the iterator has another element.

Usage

1
ihasNext(iterable)

Arguments

iterable

an iterable object, which could be an iterator.

Value

An ihasNext iterator that wraps the specified iterator and supports the hasNext method.

Examples

1
2
3
  it <- ihasNext(c('a', 'b', 'c'))
  while (hasNext(it))
    print(nextElem(it))


Search within the itertools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.