F# – specifying a discriminated union clause generic unit of measure

You can specify a function which can take in a numeric value with a generic unit of measure easily enough:

image

Similarly, you can also specify a discriminated union whose clauses can be of a numeric value with a generic unit of measure, like this:

Leave a Comment

Your email address will not be published. Required fields are marked *