Error!
Success!

F# Math - Writing generic numeric code

0
kicks

F# Math - Writing generic numeric code  (Unpublished)

Writing generic numeric code in .NET is difficult, because .NET generics do not support constraints specifying that a type has to support certain numeric operations. In this article, we look how to solve the problem in F#. Using static member constraints, it is possible to write simple generic calculations and using the INumeric interface, we can capture numeric operations for a type and use them when implementing complex types such as a matrix.


Kicked By:
Drop Kicked By: