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
9
10
def min_or_zero(xs: list[int]) -> int:
    return min(xs, default=0)


def max_or_neg1(xs: list[int]) -> int:
    return max(xs, default=-1)


def fmin_or(xs: list[float]) -> float:
    return min(xs, default=9.0)