[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Requesting Suggestions for intermediate/advanced book on Lua
 
- From: Tom N Harris <telliamed@...>
 
- Date: Mon, 07 Oct 2013 20:28:14 -0400
 
On Monday, October 07, 2013 09:44:49 AM Justin Cormack wrote:
> That seems a reasonable compromise. The f in front ordering is for
> ease of currying. Clearly this shows the incompatibility between
> functional and object, wanting the arguments the other way round...
> 
You could maybe do:
    debug.setmetatable(function()end, {__index=functionallibrary})
So with a function in the library
    function map(f, t) ... end
You can print:map(sometable). Of course all functions have to share the 
metatable and chaining or currying would be more awkward. Maybe if the 
functional library returns functions. Then it would be print:map(sometable)()
-- 
tom <telliamed@whoopdedo.org>