In many programming languages, if one wants a variable that can take a discrete number of values, one has the capacity to define the permissible values in advance, using something like an enum.
Does elisp have any functionality like that?
My use case: I'm using the same configuration file across multiple computers. I'm reading an identifier from an environment variable, and I'd really like to store that in an elisp variable as a sum type, so that I can do something like
(cond ((eq which-computer home) (do-home-config)) ((eq which-computer office) (do-office-config)) (t (message "unknown computer")))
which-computer is a variable that can only take the values
Is that a thing one can do in elisp?
(I don't really know what to tag this question, since apparently using the elisp tag is, like, verboten.)