Name cumin Example Math
Addition +x + y\( x+y \)
Subtract -x - y\( x-y \)
Minus --x\( -x \)
Multiply *x * y\( xy \)
Division /x / y\( x/y \)
Modulo %x % y\( x \bmod y \)
Power **x ** y\( x^y \)
Priority ()(x + y) * z\( (x+y)\times z \)
There are three types for Numbers:
Nat, Int and Float.
The operations do implicit type casting.
For example, the result of Nat + Float has Float.
It is one-way Nat -> Int -> Float.
Name cumin Example Math
And andx and y\( a \land b \)
Or orx or y\( a \lor b \)
Xor xorx xor y\( a \oplus b \)
Not notnot x\( \lnot a \)
Name cumin Example Math
Equal ==1 == 2 [1,2] == [1,2]\( x = y \)
Inequal !=1 != 2 [1,2] != [1,2]\( x \ne y \)
All objects containing your custom struct values can be compared with == and !=.
Name cumin Example Math
LessThan <x < y\( x < y \)
LessEqual <=x <= y\( x \leq y \)
GreaterThan >x > y\( x > y \)
GreaterEqual >=x >= y\( x \geq y \)
Only numbers can be compared.
Name cumin Example Math
Concat ++[1] ++ [2, 3]