xpile 0.1.13

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
9
10
11
12
# PMAT-474 (R5): keyword arguments f(x=1, y=2), reordered to positional
# at lowering using the callee's declared parameter order.
def area(x: int, y: int, w: int, h: int) -> int:
    return x + y + w + h


def mixed() -> int:
    return area(1, 2, h=4, w=3)


def all_kw() -> int:
    return area(x=10, y=20, w=30, h=40)