In RcppAlgos, is there documentation for checking if an iterator is false?

Viewed 44

This vignette shows a way to loop over an iterator from RcppAlgos until it has no iterations left. Here are the relevant parts:

## Initialize the iterator
a = comboIter(5, 3)

a$nextIter()
iter = a$currIter()

## Iterate until there are no more
while (!isFALSE(iter)) {
    cat(i, " ", iter, "\n")
    iter = a$nextIter()
    i = i + 1
}

The while (!isFALSE(iter)) line is what has my interest. I've been looking over the documentation for comboIter and I can't see anywhere that indicates that comboIter can take a true or false value. Clearly, it can and it does when the iterator object has ran out of iterations, but where is this documented?

1 Answers
Related