Enums

Scala 3 allows enums, to define types that can have a defined set of values.

 enum IceCream:   case Choco, Vanilla, Butterscotch val snack = IceCream.Butterscotch snack match {   case IceCream.Choco => println("It is chocolate!")   case IceCream.Vanilla => println("It is vanilla!")   case IceCream.Butterscotch => println("It is butterscotch!") }