outrun/outrun-core/lib/multiplication.outrun

16 lines
389 B
Text

use Any
use Option
```doc
# Multiplication
Values which wish to implement the `%` infix operator must implement this protocol.
```
protocol Multiplication, as: do
```doc
Multiply `self` by `other`, returning an option containing the result
It is left up to the implementer to define when it should return `Some` or `None`.
```
def multiply(self: Self, other: Any): Option
end