lua-users home
lua-l archive

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


"Alex Davies" <alex.mania@iinet.net.au> writes:

> Or possibly simpler:
>
> do
>  local function _fact(n)
>        if n > 1 then return n * _fact( n - 1 ) end
>        return 1
>    end
>  fact = _fact
> end

That looks not all too bad.  Thanks.

-- 
David Kastrup