Instantly share code, notes, and snippets.

What would you like to do?
func goodMorning(morning: Bool, whom: () -> String) {
if morning {
print("Good morning, \(whom())")
func giveAname() -> String {
print("giveAname() is called")
return "Robert"
goodMorning(morning: false, whom: giveAname())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment