lua-users home
lua-l archive

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


On Wed, Jun 15, 2011 at 09:04, Fredrik Widlund
<fredrik.widlund@qbrick.com> wrote:
> Ok, but the below example can of course trivially be rewritten as
> a=f()
> b,c=g()
>
> Whereas I can't rewrite around my problem...
>
> Fredrik

Sure you can, it's just not as pretty:

> a={1,2,3}
> b={4,5,6}
> c={unpack(a)}
> for _,v in ipairs(b) do c[#c+1]=v end

-- 
Sent from my toaster.