Created
January 28, 2019 11:25
-
-
Save salmaanahmed/eaa44b0030542f62533d25648775f30a to your computer and use it in GitHub Desktop.
The Result type forces the programmer to explicitly handle the failure and success cases before they can gain access to the actual value.
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<Wrapped, Failure> { | |
case value(Wrapped) | |
case error(Failure) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment