It has been brought to my attention that there was more use for the unintended values()
functionality that I had outline in my "Other Languages" Java example below.
On the Swift Evolution mailing list, one developer outlined their requirement to loop through an array of enum
case values to add different states to objects.
Another example where a values
array would be useful if the developer wants to do something different for each different case, such as setting an image on a UIButton
subclass for each different UIControlState