lua-users home
lua-l archive

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


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