lua-users home
lua-l archive

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


Some small corrections:

 foo = function(funcs)
   local t = { }
-  for _, fun in pairs(funcs) do
-    table.insert(t, fun())
+  for i, fun in ipairs(funcs) do
+    t[i] = fun()
   end
   return table.concat(t)
 end

--
Wim