lua-users home
lua-l archive

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

> Hi! I was hoping an expert in the internals of Lua would help me get started
> on a new project. Basically I want to add an extra feature to the Lua API
> which generates a Lua function and returns it on the stack.

Despite the example of luac.c, you'll be much better of writing this in Lua.
Something like this:
	function engram(f)
		return function (x) return f(x) end

(If this is a correct rendition of your C code, then it all seems pointless
because engram(f) behaves just as f, doesn't it?)