Shmuel Zeigerman wrote:
local function strings(S) return function() return S:Next() end end for str in strings(S) do -- [code] end
Or still shorter: for str in S.Next, S do -- [code] end -- Shmuel