// Example 4: Functions
// Demonstrates: Function definitions, calls, return values
// Usage: ruchy examples/cli/04_functions.ruchy

fun greet(name) {
    f"Hello, {name}!"
}

fun add(a, b) {
    a + b
}

fun factorial(n) {
    if n <= 1 {
        1
    } else {
        n * factorial(n - 1)
    }
}

println(greet("World"))
println(f"5 + 3 = {add(5, 3)}")
println(f"5! = {factorial(5)}")
