// Ackermann function benchmark - deep recursion
fn ack(m: Int, n: Int): Int = {
    if m == 0 then n + 1
    else if n == 0 then ack(m - 1, 1)
    else ack(m - 1, ack(m, n - 1))
}

fn main(): Unit = {
    let result = ack(3, 10)
    Console.print("ack(3,10) = " + toString(result))
}
