-
-
Save zhengbli/b182c4cf52f494aea7df03b89d692899 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
Either<TSuccess1, TError> DoWork1() { ... } | |
TSuccess2 Transform(TSuccess1 successValue1) { ... } | |
Either<TSuccessFinal, TError> DoWork2(TSuccess2 successValue1) { ... } | |
var result = DoWork1() | |
.Map(Transform) | |
.FlatMap(DoWork2) | |
// "DoOther" is another helper operator we added that handles the "Left" case | |
// and return the value as is after it's done. | |
.DoOther(ErrorHandler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment