outrun/outrun-core/lib/shift_right.outrun

16 lines
367 B
Text

use Any
use Option
```doc
# Shift Right
Values which wish to implement the `>>` infix operator must implement this protocol.
```
protocol ShiftRight, as: do
```doc
Shift `self` right by `other` bits, returning an option.
It is left up to the implementer to define when it should return `Some` or `None`.
```
def shift(self: Self, other: Any): Option
end