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.
# PMAT-502r (Tranche 2): open-ended slices xs[a:], xs[:b], xs[:] (list + str).
def head(xs: list[int], n: int) -> list[int]:
    return xs[:n]


def tail(xs: list[int], n: int) -> list[int]:
    return xs[n:]


def copy_all(xs: list[int]) -> list[int]:
    return xs[:]


def str_prefix(s: str, n: int) -> str:
    return s[:n]


def str_suffix(s: str, n: int) -> str:
    return s[n:]