Created
February 23, 2016 14:39
-
-
Save nuclearace/9774f1ccd770b6d24ad8 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 Bob { | |
| let lastName: String | |
| static var creth: Bob { | |
| return Bob(lastName: "Creth") | |
| } | |
| static func bobNamedFlumper() -> Bob { | |
| return Bob(lastName: "Flumper") | |
| } | |
| } | |
| func someFuncThatTakesABob(bob: Bob) -> String { | |
| return "Bob \(bob.lastName)" | |
| } | |
| print(someFuncThatTakesABob(.bobNamedFlumper())) | |
| print(someFuncThatTakesABob(.creth)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment