14 lines
327 B
Text
14 lines
327 B
Text
|
```doc
|
||
|
# Addition
|
||
|
|
||
|
Values which wish to implement the `+` infix operator must implement this protocol.
|
||
|
```
|
||
|
protocol Addition, as:
|
||
|
```doc
|
||
|
Add `lhs` and `rhs` together, returning an option.
|
||
|
|
||
|
It is left up to the implementer to define when it should return `Some` or `None`.
|
||
|
```
|
||
|
def add(lhs: Self, rhs: Any): Option
|
||
|
end
|