lua-users home
lua-l archive

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

David Given <> writes:
> I've also just spotted another huge advantage of in: it's reentrant.


Something like "callin (FUN, ENV, ...)" would also be reentrant
(presuming a reasonable implementation), but still offer some of the
functionality of setfenv for cases where "in ENV" doesn't suffice.

[Another possibility would be "copyfun (FUN, ENV)", which could return a
copy of FUN with the environment replaced by ENV.]


The key to happiness
 is having dreams.      [from a fortune cookie]