Created
August 31, 2017 19:25
-
-
Save JoshuaSullivan/9316b3eaa2071906cf6266bebbb1303f to your computer and use it in GitHub Desktop.
In case you were wondering who was going to give it to you…
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
import Swift | |
struct Giver { | |
enum Receiver { | |
case ya | |
} | |
private var name: String | |
init(name: String) { | |
self.name = name | |
} | |
func gonnaGiveIt(to: Receiver) { | |
print("\(name) intends to give it to \(to).") | |
} | |
} | |
let X = Giver(name: "X") | |
X.gonnaGiveIt(to: .ya) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment