do
local f, s, var = explist
local <mark> s = s -- added!
while true do
...
Am I missing something?
We're not talking about iteration in general, rather iterators and specifically the case where ownership of the resource is encapsulated within the iterator.