struct Pet{
enum Type{
case cat
case dog
var value: String{
switch self{
case .cat:
return "고양이"
case .dog:
return "강아지"
}
}
}
let kind : Type
var description: String{
return kind.value
}
}
let myCat = Pet(kind: .cat)
if myCat.kind == Pet.Kind.cat{
print("고양이 입니다")
}