lua-users home
lua-l archive

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


Thanks for the link.
I shouldn't send mails as late as i did. I realized the drawbacks
shortly after sending.

> Oh it's not a difficult trick, can have local f = y "|x| x+y" as well.
what is y inside the string? The same as the function outside the
string? Or a local/global variable? A typo? =)

> But it does not capture upvalues, as pointed out (i.e. it cannot see
> local variables in the current context)
well.. using the debug library, as long as it(the function) doesn't
get passed up the stack..?

I'm obviously no regular user of lambda-functions, do they often
modify outer variables and/or get passed up the stack?

/Pierre