xpile 0.1.615

Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
1
2
3
4
5
6
7
8
# PMAT-502f (Tranche 2): sorted(xs, reverse=True) returns a new list in
# descending order (sort-then-reverse). reverse=False is plain ascending.
def order_desc(xs: list[int]) -> list[int]:
    return sorted(xs, reverse=True)


def order_asc(xs: list[int]) -> list[int]:
    return sorted(xs, reverse=False)