Suggested small change to code (#5509)

In a code example I think it best to either use full names (index, item) or abbreviated names where that's common (i, item) but not non-standard abbreviations (indx, itm). So I've changed it to index, item since it is a tutorial, although i, item would be just as good.
This commit is contained in:
mark-summerfield
2017-03-12 16:40:14 +00:00
committed by Andreas Rumpf
parent 1be0022e7c
commit 3ab884a9e3

View File

@@ -411,8 +411,8 @@ Other useful iterators for collections (like arrays and sequences) are
* ``pairs`` and ``mpairs`` which provides the element and an index number (immutable and mutable respectively)
.. code-block:: nim
for indx, itm in ["a","b"].pairs:
echo itm, " at index ", indx
for index, item in ["a","b"].pairs:
echo item, " at index ", index
# => a at index 0
# => b at index 1