F# Units of measure, problems with genericity

前端 未结 2 1116
名媛妹妹
名媛妹妹 2020-12-21 07:12

(I\'m still banging on with units of measure in F#)

I\'m having a problem making \'generic\' functions which take \'typed\' floats.

The following mo

2条回答
  •  长情又很酷
    2020-12-21 07:53

    Units of measure cannot be used as type parameters. This is because the are erased by the compiler during compilation. This question is quite similar: F# Units of measure - 'lifting' values to float

提交回复
热议问题