Last active
October 24, 2015 08:56
-
-
Save cennydavidsson/d489a7d1d183265a09d4 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
| struct Superhero: SuperheroType { | |
| let name: String | |
| let secretIdentiy: String | |
| let canFly: Bool | |
| let powerLevel: Int | |
| } | |
| protocol SuperheroType { | |
| var name: String { get } | |
| var secretIdentiy: String { get } | |
| var canFly: Bool { get } | |
| var powerLevel: Int { get } | |
| } | |
| extension SuperheroType { | |
| func flyToLocation(location: Location) {/* implementation */} | |
| func punchVillian(villian: Villian) {/* implementation */} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment