How to create a data-type that is a subset of possible values for another data-type
<p>How can I create a data type that only allows particular values of another data type. For example, let's say I want to create a type that's limited to the fifty states as strings. How would I go about doing that? Using an <code>enum</code> and then a helper function feels a bit hacky to me.</p>

<p>EDIT: I suppose it is late to add this, but a compile-time error checking solution would be ideal.</p>
