mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
13 lines
199 B
Python
13 lines
199 B
Python
add x, y =
|
|
x + y
|
|
|
|
print! add(1, 1)
|
|
print! add(1.0, 1)
|
|
print! add("a", "b")
|
|
|
|
close_add|A <: Add(A)| x: A, y: A =
|
|
x + y
|
|
|
|
print! close_add 1, 1
|
|
print! close_add 1.0, 1
|
|
print! close_add "a", "b"
|