if I want to define an extension method for a float array, for example, standard deviation, would it be better to use a module extension on a module or an Array extension on a type float[] ? eg:
module Array = let std (arr: float[]) = ...
or
type float ``[]`` with member this.std = ...
If I use a type extension as the last, will std be evaluated once or every time it will be used?
And, what is the correct format for the latter, perhaps type float ``[]`` with does not compile ... thanks.
source share