16 lines
361 B
Text
16 lines
361 B
Text
use Any
|
|
use Option
|
|
|
|
```doc
|
|
# Bitwise And
|
|
|
|
Values which wish to implement the `&` infix operator must implement this protocol.
|
|
```
|
|
protocol BitwiseAnd, as: do
|
|
```doc
|
|
And `self` and `other` together, returning an option.
|
|
|
|
It is left up to the implementer to define when it should return `Some` or `None`.
|
|
```
|
|
def and(self: Self, other: Any): Option
|
|
end
|