Suppose I wanted to create a Record type that represents acceptable min/max bounds:
type Bounds = { Min: float; Max: float }
Is there a way
A dodgy solution for the string example - use a DU
type cleverstring = |S of char * string
This will force the string to have at least one charcter. Then you can just use cleverstring
instead of string
in your record, although you probably want to write some wrapper functions to make it look like a string.