Last active
November 28, 2016 17:16
-
-
Save vhart/0dfa95e73117955d09de5ed5973e2a6e to your computer and use it in GitHub Desktop.
Protocol-Generics Pt 1
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
protocol Drivable { | |
func drive() | |
var numberOfWheels: Int { get } | |
} | |
func startTraveling(with transportation: Drivable) { } | |
func startTraveling<D: Drivable>(with transportation: D) { } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment