lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



foreach k,v in t --> for k,v in pairs(t)

Or maybe turn it into a value iteration shorthand:

foreach v in t --> for _,v in pairs(t)

Iterations that ignore keys are something that I do use quite a bit in my own code.  "for k,v in pairs(t)" isn't really that bad, as boilerplate goes, but "for _,v in pairs(t)" is pretty awkward.