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
5
6
7
8
9
10
11
12
13
from typing import Optional


def not_int(x: Optional[int]) -> bool:
    return not x


def not_str(x: Optional[str]) -> bool:
    return not x


def not_list(x: Optional[list[int]]) -> bool:
    return not x