luah 1.1.0

Unofficial lua impl by HydroRoll-Team.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- $Id: ackermann.lua,v 1.5 2000/12/09 20:07:43 doug Exp $
-- http://www.bagley.org/~doug/shootout/

local function Ack(M, N)
    if (M == 0) then
        return N + 1
    end
    if (N == 0) then
        return Ack(M - 1, 1)
    end
    return Ack(M - 1, Ack(M, (N - 1)))
end

print(Ack(2,10))

-- use `--release` to run this:
--print(Ack(3,10))