Last active
November 28, 2016 17:16
-
-
Save vhart/05d5bfd885f382fcf66538345ffc0231 to your computer and use it in GitHub Desktop.
ProtocolGenericPt2
This file contains 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 Car: Drivable { | |
let numberOfWheels = 4 | |
func drive() { } | |
} | |
struct Motorcycle: Drivable { | |
let numberOfWheels = 2 | |
let licensePlate = "asdf123" | |
func drive() { } | |
} | |
struct Bus: Drivable { | |
let numberOfWheels = 8 | |
let fare = 2.25 | |
let seats = 28 | |
let totalOccupancy = 38 | |
func drive() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment