Reference

Operators

Equality

Input Two arguments of equatable type.
Output True if equal, false otherwise.

Symbol

==

Example

5 == 5 // returns true

Inequality

Input Two arguments of equatable type.
Output True if not equal, false otherwise.

Symbol

!=

Example

5 != 3 // returns true

Greater than

Input Two arguments of the same type.
Output True if first argument exceeds the second, false otherwise.

Symbol

>

Example

5 > 3 // returns true

Less than

Input Two arguments of the same type.
Output True if first argument is less than second, false otherwise.

Symbol

<

Example

3 < 5 // returns true

Greater than or equal

Input Two arguments of the same type.
Output True if first argument is greater than or equal to second, false otherwise.

Symbol

>=

Example

5 >= 5 // returns true

Less than or equal

Input Two arguments of the same type.
Output True if first argument is less than or equal to second, false otherwise.

Symbol

<=

Example

3 <= 5 // returns true

Addition

Input Two arguments of addable type.
Output The combined result.

Symbol

+

Example

3 + 4 // returns 7

Subtraction

Input Two arguments of subtractable type.
Output The result of the subtraction.

Symbol

-

Example

10 - 3 // returns 7

Multiplication

Input Two numbers.
Output The product of the numbers.

Symbol

*

Example

3 * 4 // returns 12

Division

Input Two numbers.
Output The quotient.

Symbol

/

Example

10 / 2 // returns 5

Modulo

Input Two numbers.
Output The remainder of division.

Symbol

%

Example

10 % 3 // returns 1

And (short-circuit)

Input Two boolean arguments.
Output True only if both arguments are true, false otherwise. Short-circuit (lazy) - the second operand is only evaluated if the first is true.

Symbol

&& // alias: and

Example

true && false // returns false

And (strict)

Input Two boolean arguments.
Output True only if both arguments are true, false otherwise. Strict (eager) - both operands are always evaluated.

Symbol

&

Example

true & false // returns false

Or (short-circuit)

Input Two boolean arguments.
Output True if at least one argument is true, false otherwise. Short-circuit (lazy) - the second operand is only evaluated if the first is false.

Symbol

|| // alias: or

Example

true || false // returns true

Or (strict)

Input Two boolean arguments.
Output True if at least one argument is true, false otherwise. Strict (eager) - both operands are always evaluated.

Symbol

|

Example

true | false // returns true

Not

Input One boolean argument.
Output True if argument is false; false if argument is true.

Symbol

! // alias: not

Example

!true // returns false

Element at

Input An indexable argument (String, List or Map) and a hashable argument.
Output The element at the given position or key.

Symbol

@ // alias: a[b]

Example

[10, 20, 30] @ 1 // returns 20
"abc"[2] // returns "c"
{"name": "Alice"}["name"] // returns "Alice"