Commit 68bf4fd8 authored by nanahira's avatar nanahira

fix iter in underscore

parent bc6dd55e
......@@ -37,10 +37,10 @@ end
function Underscore.iter(list_or_iter)
if type(list_or_iter) == "function" then return list_or_iter end
local pair_iter=ipairs(list_or_iter)
local i = 0
return function()
local placeholder,res=pair_iter()
return res
i = i + 1
return list_or_iter[i]
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment