lua-users home
lua-l archive

Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack)

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


On 16-06-22 10:58 PM, Dirk Laurie wrote:
> 2016年06月22日 17:55 GMT+02:00 Eduardo Ochs <eduardoochs@gmail.com>:
>> pack = table.pack or function (...) return {n=select("#", ...), ...} end
>>
> The annotated list is my favourite Lua structure, e.g.
> {shape={2,3},1,2,3,4,5,6} for a matrix.
You may treat result of table.pack() as annotated list. ".n" have the
same sense as ".shape" in your example.

AltStyle によって変換されたページ (->オリジナル) /