F# numeric associations
- by b1g3ar5
I have a numeric association for a custom type as follows:
let DiffNumerics =
{ new INumeric<Diff> with
member op.Zero = C 0.0
member op.One = C 1.0
member op.Add(a,b) = a + b
member op.Subtract(a,b) = a - b
member op.Multiply(a,b) = a * b
member ops.Negate(a) = Diff.negate a
member ops.Abs(a) =…