mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
17 lines
239 B
Nim
17 lines
239 B
Nim
#{.experimental: "unicodeOperators".}
|
|
|
|
proc `⊙`(x, y: int): int = x * y
|
|
proc `⊙=`(x: var int, y: int) = x *= y
|
|
|
|
proc `⊞++`(x, y: int): int = x + y
|
|
|
|
const a = 9
|
|
|
|
var x = 45
|
|
x ⊙= a⊞++4⊙3
|
|
|
|
var y = 45
|
|
y *= 9 + 4 * 3
|
|
|
|
assert x == y
|