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-502t (Tranche 2): the reverse idiom xs[::-1] over a list -> a new
# reversed list (reuses Expr::Reversed; input unchanged).
def rev(xs: list[int]) -> list[int]:
    return xs[::-1]


def rev_strs(words: list[str]) -> list[str]:
    return words[::-1]