outrun/outrun-core/lib/exponentiation.outrun

16 lines
376 B
Text

use Any
use Option
```doc
# Exponentiation
Values which wish to implement the `**` infix operator must implement this protocol.
```
protocol Exponentiation, as: do
```doc
Raise `self` to the power of `other`, returning an option.
It is left up to the implementer to define when it should return `Some` or `None`.
```
def raise(self: Self, other: Any): Option
end