Skip to content

Instantly share code, notes, and snippets.

@stevekinney
Created June 4, 2014 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevekinney/f29e4903675d5d7d1a57 to your computer and use it in GitHub Desktop.
Save stevekinney/f29e4903675d5d7d1a57 to your computer and use it in GitHub Desktop.
enum Planet: Int {
case Mercury = 1, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune
}
Planet.Mercury.toRaw()
let possiblePlanet = Planet.fromRaw(7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment