Enum Specialization
You are special, like the enum types
enum Presidents = Mandela | Obama | Putin | JunPingfn zar(prez: Presidents.Mandela): String => prez + " Was the president of South Africa"
fn main(): Unit => {
val myprez = Presidents.Mandela
println(zar(myprez)) (* compiles successfully *)
println(rus(myprez)) (* fails *)
}Last updated