lua-users home
lua-l archive

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

> so could I write
>> inject "math" sandbox
> too?  Does it only work for one parameter functions or is it
> purely stackbased?

No.  The sugar is available for functions that take a single
argument of type string or table:

f "aap"
f 'aap'
f [[aap]]
f {"aap", x = "noot"}

If such a call returns another function then you can create
nifty looking call chains:

f "aap" {x = "noot", y = "mies"} [[c:\temp\vuur.txt]]

So this is just three function calls.