Last active
November 19, 2015 02:29
-
-
Save ayanonagon/fbb7f87014778818fc61 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
enum Result<T> { | |
case Success(T) | |
case Error(NSError) | |
} | |
func listMessages(completion: Result<[Message]> -> Void) { | |
// Get the list of messages | |
// If success, call completion(Result.Success(messages)) | |
// If error, call completion(Result.Error(error)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment