fn fib(n: Int): Int = if n <= 1 then n else fib(n - 1) + fib(n - 2)

fn factorial(n: Int): Int = if n <= 1 then 1 else n * factorial(n - 1)

fn main(): Unit with {Console} = {
    let fibResult = fib(30)
    let factResult = factorial(10)
    Console.print("fib(30) = " + toString(fibResult))
    Console.print("factorial(10) = " + toString(factResult))
    Console.print("Total = " + toString(fibResult + factResult))
}

let output = run main() with {}
