//playground to test automata
enum dualStorage {
case A(int:Int, string:String)
init(int:Int, string:String){
self = dualStorage.A(int: int, string: string)
}
//computed property for the int
var int:Int {
switch self {
case .A(let int, _):
return int
}
}
//computed property for the string
var string:String {
switch self {
case .A(_, let string):
return string
}
}
}