Skip to content

Instantly share code, notes, and snippets.

@vhart
Last active November 28, 2016 17:16
Show Gist options
  • Save vhart/05d5bfd885f382fcf66538345ffc0231 to your computer and use it in GitHub Desktop.
Save vhart/05d5bfd885f382fcf66538345ffc0231 to your computer and use it in GitHub Desktop.
ProtocolGenericPt2
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