ruchy 4.1.1

A systems scripting language that transpiles to idiomatic Rust with extreme quality engineering
Documentation
// 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)}")