lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
> 
> It is already added (for next version, 4.1). The current name is "unpack",
> but we may change it ("expand" is a good sugestion).

In Sol I made it unpack(table [,startpos=1] [,endpos=-1]) so that you
may even extract parts of a list.  It's basically a subset of Sol's
remove(table, [,startpos=-1] [,endpos=startpos]).  Both return the
specified elements.

> About the "compress" function, we intend to change a little the semantics
> of the language, so that {..., f(x)} will put all returns of the last call
> into the list. This will create a small incompatibility, but it is much
> more coherent with the current semantics for function calls and returns.

Nice idea.  On my todo list now ;)

Ciao, ET.