xpile 0.1.616

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
# PMAT-502cr (Tranche 2): str.swapcase() — upper<->lower each char,
# non-cased chars (digits/punctuation/space) unchanged.
def swap(s: str) -> str:
    return s.swapcase()