It's just pairs and it's Roberto's solution not mine.
The 'k' variable is the key of the list, the '_' just means ignore the value as we are just interested in the key. If you put a variable in there as well then you would get the value of each entry as well as the key, e.g.: ' for key,val in pairs(<list>
do' or even 'for _, val in pairs(<list>
do' which would give just the values.
Note that the 'value' from a list can be another list or a function, it's very easy to encapsulate the data and functions (or methods if you prefer) together in a list to create objects, metatables can then be used to implement inheritance, privacy and any other oop like features if you feel the need.
The second half of the book (the 5.3 version as he has restructured it from 5.2) is a bit scary at first glance but there is a lot of really clever stuff in there that is worth reading up on even if you never actually use it.
Been there, done that, got all the T-Shirts!