Created
May 18, 2017 07:45
-
-
Save JiLiZART/48d4dc87a0f924d2bb421772e53031cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Event { | |
enum app: String { | |
case install = "app install" | |
case launch = "app launch" | |
} | |
enum list: String { | |
case created = "list created" | |
case deleted = "list deleted" | |
case refreshed = "list refreshed" | |
} | |
} | |
func printEvent<T : RawRepresentable>(_ event: T) { | |
print(event.rawValue); | |
} | |
let myEvent = Event.app.launch | |
printEvent(myEvent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment