lua-users home
lua-l archive

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


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