Enumerations
Using case object
Unlike other languages, Scala does not have a keyword for enumerations. One way to implement them is by using case objects. For example:
1sealed trait OperatingSystem extends Product with Serializable
2
3object OperatingSystem {
4 …