mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
17 lines
230 B
Python
17 lines
230 B
Python
f {.x; .y}, [_], (_, _) = x + y
|
|
|
|
x = f {.x = 1; .y = 2}, [3], (4, 5)
|
|
assert x == 3
|
|
|
|
g _: Int = None
|
|
g 10
|
|
|
|
h _: Int, _: Int = None
|
|
h 10, 20
|
|
|
|
#[
|
|
and: [Bool; 2] -> Bool
|
|
and [True, t] = t
|
|
and [_, _] = False
|
|
assert and [True, True]
|
|
]#
|