ruchy 4.2.0

A systems scripting language that transpiles to idiomatic Rust with extreme quality engineering
Documentation
// LANG-COMP-009: Pattern Matching - Variable Patterns
// Demonstrates pattern matching with variable binding

let value = 100

// Match with variable binding in arms
let category = match value {
    0 => "zero".to_string(),
    x if x < 10 => "single digit".to_string(),
    x if x < 100 => "double digit".to_string(),
    x => f"large number: {x}"
}

println(category)

// Match with wildcard pattern
let status_code = 404

let response = match status_code {
    200 => "OK",
    404 => "Not Found",
    500 => "Server Error",
    _ => "Unknown"
}

println(response)