ruchy 4.2.1

A systems scripting language that transpiles to idiomatic Rust with extreme quality engineering
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    let value = 100;
    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 => format!("large number: {}", x),
    };
    println!("{:?}", category);
    let status_code = 404;
    let response = match status_code {
        200 => "OK",
        404 => "Not Found",
        500 => "Server Error",
        _ => "Unknown",
    };
    println!("{:?}", response);
}