lua-users home
lua-l archive

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


> Regarding use cases, not everyone I've discussed this with over IRC
> thinks it's a useful addition to Lua. However, I think the
> tostringall() example above alone shows that at least map() has some
> very useful use cases. Thoughts?
>
I may have missed something while reading through this, but why not
use tables, like this?
function tostringall(...)
   local t={...}
   for k,v in ipairs(t)
      t[k]=tostring(v)
   end
   return unpack(t)
end

/Pierre