[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: _SELF and _SUPER
- From: "Soni L." <fakedme@...>
- Date: Sat, 6 Aug 2016 17:45:24 -0300
On 06/08/16 05:36 PM, Sean Conner wrote:
No, I said _SUPER is exactly like _SELF but it uses the parent closure
instead of the current closure.
It was thus said that the Great Soni L. once stated:
On 06/08/16 05:30 PM, Sean Conner wrote:
You just need a Y-combinator:
local function g(...) return f(g,...) end
if x < 2 then
return x * rec(x-1)
That will allow you to call an anonymous function recurively from within
the anonymous function. No need for _SELF in this case.
That doesn't solve the dynamic variable indexing issue.
Oh, I'm sorry I failed to read your mind again. I thought that was what
_SUPER was for. I'm so sorry you have to reject MY ATTEMPT to give you
something you could use and grovel that I have to have your proposal
explained to me like I'm five.
-spc (Why do I even bother?)
Which's why you can do things like
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.