New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should I iterate over all elements in a list? #2
Comments
You're supposed to use
|
Thanks for the reply. I think current iterator would also be problematic if the list is empty. Maybe this is another issue. Anyway, I'm changing my mind to use arrays for my problem instead of List::DoubleLinked. So if you don't have time, just ignore this issue :) |
In 0.004, this should work conceptually the same as in C++. that is:
|
Thanks! |
I have trouble iterating over ALL elements in the list.
Currently, I can think of two ways:
I suggest adding is_first() and is_last() methods to Iterator. That way, we can iterate the whole list safely.
The text was updated successfully, but these errors were encountered: