Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created July 19, 2019 10:24
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 fitomad/7b0195f03af7df951f4bd4863d77eea1 to your computer and use it in GitHub Desktop.
Save fitomad/7b0195f03af7df951f4bd4863d77eea1 to your computer and use it in GitHub Desktop.
let index = Int.random(in: 0 ..< Princesa.allCases.count)
switch Princesa.allCases[index]
{
case .elsa:
print("Elsa")
case .anna:
print("Anna")
@unknown default:
print("Por si hacen Frozen 3 y aparece una nueva princesa")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment