[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Addition of map() and filter().
- From: Pierre LeMoine <yarr.luben@...>
- Date: Mon, 12 Oct 2009 23:44:02 +0200
> 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