Skip to content

Instantly share code, notes, and snippets.

@fjolnir
Last active August 29, 2015 14:25
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 fjolnir/e198dd6186a0fb62dc86 to your computer and use it in GitHub Desktop.
Save fjolnir/e198dd6186a0fb62dc86 to your computer and use it in GitHub Desktop.
No DRYer way?
enum Question {
case Confirmation
case Photo
enum Answer {
case Confirmation(Bool)
case Photo(UIImage)
}
}
@fjolnir
Copy link
Author

fjolnir commented Jul 19, 2015

I would like to do something along the lines of

enum Question {
    case Confirmation = Bool.Type
    case Photo = UIImage.Type
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment