3 ms·
You can create your own type of iterator that when dereferenced spits out the next number/item, So long as your "end" iterator never matches your "current" iter
by X-Istence 14y ago
You can create your own type of iterator that when dereferenced spits out the next number/item, So long as your "end" iterator never matches your "current" iterator it will continue going on. Your "done" function is when "current" and "end" match. "next()" is "++current".