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
11
12
# PMAT-502ag (Tranche 2): string classification predicates
# .isdigit()/.isalpha()/.isspace() -> Bool. Empty string is False (Python).
def all_digits(s: str) -> bool:
    return s.isdigit()


def all_alpha(s: str) -> bool:
    return s.isalpha()


def all_space(s: str) -> bool:
    return s.isspace()