I am calling external function requiring float[]
, but my array is float<m>[]
.
How could I strip the unit of measure from array?
I need something like the function below, but this does not compile.
And I would like to avoid any iterating or duplicating of the array, as float<m>
and float
values are identical...
let demeasure (arr:float<m>[]): float[] = float[] (arr)
Unchecked.defaultof<'``Num<'M>``> * (LanguagePrimitives.GenericOne : 'Num)
prevent "FS0030: Value restriction" error? Also how did you come up withx: '``Num<'M>``
? Surprised to see the compiler accepts it – Celiaceliac