Change the structure of the .erg directory

This commit is contained in:
Shunsuke Shibayama 2022-10-16 12:04:39 +09:00
parent 8c6997d3c9
commit 7bc37aa14a
7 changed files with 44 additions and 12 deletions

View file

@ -0,0 +1,13 @@
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)