-
Notifications
You must be signed in to change notification settings - Fork 2
Nullable and NullableM
Андрей Мулик edited this page Sep 21, 2023
·
2 revisions
Nullable
- a class of types with immutable shape that have a neutral element regarding the concatenation.
NullableM
- a class of types with mutable shape that have a neutral element regarding the concatenation.
Nullable
- special case of NullableM
.
The Nullable
class was separated from Linear
in sdp-0.2
, and NullableM
from LinearM
in sdp-0.3
.
Method | Nullable | Added | NullableM | Added |
---|---|---|---|---|
Neutral element | lzero | 0.2 | newNull | 0.3 |
Check for neutral element | isNull | 0.2 | nowNull | 0.3 |
If the type implements Eq, then comparing the value with
lzeromust be equivalent to
isNull`. If a type has several neutral elements by concatenation, then they must all be equal to each other.