NumType<SELF, NUM, A> Class

NumType - inspired by Haskell's 'newtype' keyword. This is setup for numeric types,and expects a Num<A> class-instance as an argument (TInt, TDouble, etc.)

https://wiki.haskell.org/Newtype

Derive type from this one to get: Equatable, Comparable, Appendable, Foldable, Functor, Iterable: strongly typed values.

For example:

class Metres : NumType<Metres, TDouble, double> { public Metres(double x) : base(x) {} }


Will not accept null values

DECLARATION
[Serializable]
public abstract class NumType<SELF, NUM, A> : NumType<SELF, NUM, A, True<A>>
NAMESPACE
LanguageExt

Constructors

NumType(A)
SUMMARY

Constructor

PARAMETERS
value
A
Value to bind
DECLARATION
public ctor NumType(A value)
EXCEPTIONS
ArgumentNullException
Null values are not accepted