You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we also need to have an iteration counter (starting from zero), we can achieve that by using for , in : syntax. This is very practical if you want to iterate through one iterable, and simultaneously access another iterable at the same offset.
However, as far as I know, this works only with strings, it does not work for iterators in general (for example countTo fails). However, it does work on containers. At least in my Nim 1.4.0.
So I suggest changing the text to:
If we also need to have an iteration counter (starting from zero), we can achieve that by using for , in : syntax. This is very practical if you want to iterate through one container, and simultaneously access another container at the same offset. Containers are explained just a little bit later.
The text was updated successfully, but these errors were encountered:
Ah, so a more specific type of containers than just general containers. However, as soon as I read iterators in the tutorial, I tried countTo and failed, got confused and then tried string and some containers. But I saw already other Nim tutorials and program in Python.
As the text follows directly examples of iterators, some caution for new users would, I think, be helpful.
However, as far as I know, this works only with strings, it does not work for iterators in general (for example countTo fails). However, it does work on containers. At least in my Nim 1.4.0.
So I suggest changing the text to:
The text was updated successfully, but these errors were encountered: