Sean Kelly wrote:
> Still, I think it's useful to have in an
> iterator, so perhaps something roughly like this:
>
> interface Iterator(T)
> {
> T val();
> T next();
> bool hasNext();
> }
Err... this doesn't work for an iterator returned for an empty
container. Perhaps:
interface Iterator(T)
{
T val();
T next();
bool atEnd();
}
Anyway, you get the idea.
Sean