mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
25 lines
360 B
Python
25 lines
360 B
Python
id x = x
|
|
|
|
if__ cond, then, else = if cond, then, else
|
|
|
|
for__! i, proc! = for! i, proc!
|
|
|
|
add x, y = x + y
|
|
|
|
abs_ x = x.abs()
|
|
|
|
|
|
Norm = Trait { .norm = (self: Self) -> Nat }
|
|
norm x = x.norm()
|
|
|
|
a = [1, 2] + [3, 4]
|
|
|
|
abc = ["c"] + ["a", "b"][1..1000]
|
|
|
|
f! t =
|
|
arr = ![]
|
|
result = ![]
|
|
result.push! t
|
|
for! arr, t =>
|
|
result.extend! f! t
|
|
result
|