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
fun quicksort(arr: [i32]) -> [i32] {
    if arr.len() <= 1 {
        arr
    } else {
        let pivot = arr[0]
        let less = arr |> filter(x => x < pivot)
        let greater = arr |> filter(x => x > pivot)
        quicksort(less) + [pivot] + quicksort(greater)
    }
}