lua-users home
lua-l archive

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


On Sun, May 18, 2008 at 6:42 PM, Linker <linker.m.lin@gmail.com> wrote:
MetaLua maybe a good choice.

On Mon, May 19, 2008 at 12:01 AM, ddneilson <ddneilson@gmail.com> wrote:
Miles Bader wrote:
ddneilson <ddneilson@gmail.com> writes:
E.g., some sort of "@splice ..." special-form which would tell the
compiler to keep all values:

  fun1 (fun2(), @splice fun3(), @splice fun4(), fun5())

would keep only the first result of fun2, but would keep all results from fun3, fun4, and fun5.

The standard "clist" extension provides most of what  you're asking for, although not implemented in an efficient way (could be fixed, it's just a matter of available time vs. what I personally need most). Your example could already be written as:

-{ extension 'clist' } -- load the extension
...
fun1 (unpack{ fun2(), fun3()..., fun4()..., fun5()})