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