// Ackermann function benchmark - deep recursion
function ack(m, n) {
    if (m === 0) return n + 1;
    if (n === 0) return ack(m - 1, 1);
    return ack(m - 1, ack(m, n - 1));
}

const result = ack(3, 10);
console.log(`ack(3,10) = ${result}`);
