public delegate IteratorResult IteratorNextFunction (Iterator it, Value result)
The function that will be called when the next element of the iterator should be retrieved.
Implementors of a Iterator should implement this function and pass it to the constructor of the custom iterator. The function will be called with the iterator lock held.
a pointer to hold the next item
the result of the operation.