Generic definition of iterators.