[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: function foo() in table
- From: Sean Conner <sean@...>
- Date: Tue, 22 Apr 2014 17:03:42 -0400
It was thus said that the Great Petite Abeille once stated:
>
> On Apr 22, 2014, at 6:14 AM, Sean Conner <sean@conman.org> wrote:
>
> > allowing a anonymous (non-named) function to call itself
>
> Like this?
>
> print( ( function( n ) if n == 0 then return 1 end return n * debug.getinfo( 1, 'f' ).func( n - 1 ) end )( 5 ) )
Yes, but without using the debug module.
-spc
- References:
- function foo() in table, Marc Lepage
- Re: function foo() in table, Andrew Starks
- Re: function foo() in table, Duncan Cross
- Re: function foo() in table, Andrew Starks
- Re: function foo() in table, Dirk Laurie
- Re: function foo() in table, Coroutines
- Re: function foo() in table, Sean Conner
- Re: function foo() in table, Dirk Laurie
- Re: function foo() in table, Sean Conner
- Re: function foo() in table, Petite Abeille