erg/tests/pattern.er
Shunsuke Shibayama 0e1d02f18d Update pattern.er
2022-11-11 00:51:41 +09:00

11 lines
170 B
Python

f {x; y}, [_], (_, _) = x + y
x = f {x = 1; y = 2}, [3], (4, 5)
assert x == 3
#[
and: [Bool; 2] -> Bool
and [True, t] = t
and [_, _] = False
assert and [True, True]
]#