Last active
March 17, 2019 18:23
-
-
Save eroth/d1895984bee8bee11c5f4ba83f3d0bc0 to your computer and use it in GitHub Desktop.
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 doSomethingClosure(_ completed: ((String) -> Void)) { | |
completed("We're using closures.") | |
} | |
doSomethingClosure { result in | |
print("result: \(result)") | |
} | |
// prints "result: We're using closures." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment