outrun/outrun-core/lib/modulus.run

13 lines
354 B
Text

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