Open benaadams opened 4 years ago
To demonstrate virtual also? (so if an operator can be defined in terms of another; it can be by default to reduce ceremony)
Might not be the actual INumeric
approach due to unsigned types; but helps with communicating the possibilities?
Also add default ==
and !=
to demonstrate the reduction in ceremony.
e.g. implement IEquatable<T>.Equals
and get ==
and !=
for free.
Implement a default subtraction operator using negation operator and addition
Use it to produce an enumerable of differences in the sequence.