Enum constructors can be matched using pattern matching.
Assume the following enum:
enum Color {
Red;
Green;
Blue;
RGB(r : Int, g : Int, b : Int);
}
Colours with only a green channel value can be matched as follows:
var color = Color.RGB(0, 127, 0);
var isGreenOnly = swit...