lua-users home
lua-l archive

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


XenoLiz wrote:
> On the contentious issue(problem) of lambda function can look imposing
> new keyword:
> Lua :
>     local local_f = function(x,y) return local_f(x)+local_f(y) end ---
> not work
>     local local_g
>     local_g = function(x,y) return local_g(x)+local_g(y) end  -- it`s
> half decision
>  
> Lua_New:
>     local local_f = function(x,y) return *lambda*(self,
> x)+*lambda*(self, y) end
>     a={ __main=function(x) return *lambda*(self.super, x.value) end,
> __run=function(x,y) if x>1 then return function(a,b) return
> *lambda:1:*(self, x-1, a) | *lambda:1:*(self, y-1, b) end  return 1/y end }
>  
> or something of this kind

Unnecessary verbiage. The function definition syntax sugar does
this well enough, please read the reference manual again.

-- 
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia