lua-users home
lua-l archive

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


Why this simple code

for i = 1, 5 do print(i) end

cannot be written in more general form ?

local function f() return 1, 5 end
for i = f() do print(i) end

-- Egor