Docs > Operators and Overloading
Several operators are provided: `+`, `-`, `*`, and `/` function as normal. `%` and `^` represent modulus and exponentiation, respectively. `<`, `>`, `<=`, `>=`, `==`, and `!=` behave as normal.
Objects can overload these operators using several functions:
- `__add` for `+`,
- `__sub` for `-`,
- `__mul` for `*`,
- `__div` for `/`,
- `__mod` for `%`,
- `__pow` for `^`,
- `__lt` for `<`,
- `__gt` for `>`,
- `__le` for `<=`,
- `__ge` for `>=`,
- `__eq` for `==`,
- and finally, `__neq` for `!=`.
For example, to create an object `A` which can be added to, we might do:
```
object A(n) {
fn __add(other) {
n + other
}
}
```
Then we can do something like the following:
```
obj = new A(5)
obj + 6
```
This should evaluate to `11`.
## Overloading Str and Bool Representation
One thing you may have noticed is that when printed on the REPL, objects use the native Ruby format, ie. `