[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: SV: pack/unpack
- From: HyperHacker <hyperhacker@...>
- Date: Wed, 15 Jun 2011 09:28:22 -0600
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.