diff --git a/lume.lua b/lume.lua index 83650e0..0ffc738 100644 --- a/lume.lua +++ b/lume.lua @@ -286,8 +286,8 @@ end function lume.reduce(t, fn, first) + local started = first ~= nil local acc = first - local started = first and true or false local iter = getiter(t) for _, v in iter(t) do if started then @@ -724,7 +724,7 @@ end local ripairs_iter = function(t, i) i = i - 1 local v = t[i] - if v ~= nil then + if v ~= nil then return i, v end end