[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: function foo() in table
- From: Andrew Starks <andrew.starks@...>
- Date: Tue, 22 Apr 2014 16:02:13 -0500
On Tue, Apr 22, 2014 at 3:53 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
>
> 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 ) )
>
>> 120
>
>
I find it refreshing and somewhat validating that lua lends itself so
nicely to obfuscated code contests.
-Andrew
- 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