Created
June 15, 2016 19:11
-
-
Save chamook/0bf33e0735ade8b053f50a3f87f17b94 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| namespace Rop | |
| type Result<'TSuccess, 'TFailure> = | |
| | Success of 'TSuccess | |
| | Failure of 'TFailure | |
| module Result = | |
| let map f x = | |
| match x with | |
| | Success s -> s |> f |> Success | |
| | Failure y -> y |> Failure | |
| let bind f x = | |
| match x with | |
| | Success s -> s |> f | |
| | Failure y -> y |> Failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment