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

You can spec­i­fy a func­tion which can take in a numer­ic val­ue with a gener­ic unit of mea­sure eas­i­ly enough:

image

Sim­i­lar­ly, you can also spec­i­fy a dis­crim­i­nat­ed union whose claus­es can be of a numer­ic val­ue with a gener­ic unit of mea­sure, like this: