ruchy 4.1.2

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
// Example 9: Match Expressions
// Tests: Pattern matching
// Expected: "two"

fun main() {
    let x = 2
    let result = match x {
        1 => "one",
        2 => "two",
        3 => "three",
        _ => "other"
    }
    println(result)
}