lua-users home
lua-l archive

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


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