16 lines
364 B
Text
16 lines
364 B
Text
use Any
|
|
use Option
|
|
|
|
```doc
|
|
# Shift Left
|
|
|
|
Values which wish to implement the `<<` infix operator must implement this protocol.
|
|
```
|
|
protocol ShiftLeft, as: do
|
|
```doc
|
|
Shift `self` left 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
|