Enum powiązane wartości Swift

enum Laptop {

  // associate string value
  case name(String)

  // associate integer value  
  case price (Int)
}

// pass string value to name
var brand = Laptop.name("Razer")
print(brand)

// pass integer value to price
var offer = Laptop.price(1599)
print(offer)
SAMER SAEID