Last active
July 11, 2018 06:14
-
-
Save PavelGnatyuk/36127f69e6f9f35a52aa280850c0a020 to your computer and use it in GitHub Desktop.
autoclosure sample code 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
func goodMorning(morning: Bool, whom: String) { | |
if morning { | |
print("Good morning, \(whom)") | |
} | |
} | |
goodMorning(morning: true, whom: "Pavel") | |
goodMorning(morning: false, whom: "John") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment