F# Math - Writing generic numeric code(tomasp.net)
submitted by
tomasp(299) 5 months, 28 days ago
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.
|category: F#
|Views: 28
tags:
F# another
Everyones tags:
Your Tags: