> a={1,2,3}
> b={9,8,7}
> c={unpack(a),unpack(b)}
> =#c
4
> for _,v in ipairs(c) do print(v)
end
1
9
8
7
>
I think the variable c should be {1,2,3,9,8,7},
doesn't it?
I can understand the confusion, but it is expected behavior. In any given statement, you only get the first return per function until the last in
the chain. Table declarations are no exception. Without that behavior, you could end up with some very awkward situations, like so:
function foo(bar) return bar*2,bar*3,bar*4 end
t = { foo(7), 15, foo(8) }
for i,v in ipairs(t) do print(i,v) end