erg_compiler 0.5.9-nightly.6

Centimetre: the Erg compiler
discard _x = None

discard 1

# if: |T, U|(Bool, T, U) -> T or U
cond|T: Type|(c: Bool, then: T, else: T): T =
    if c:
        do then
        do else

assert cond(False, 1, 2) == 2
# assert cond(True, 1, 3) == "a"
# assert "a" == cond(True, 1, 3)