lua-users home
lua-l archive

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

>Use case is implementing something like an effect system for Lua, see
><> where causing an
>effect is implemented by yielding in Lua.

The general pattern I think for this is to yield a tagged value  to request an effect be performed. You might expose a function called "perform(...)" which performs such a yield. You can then implement a closer in terms of this higher level function and it should just work: tm: