I have two functions that return Either<Error,?>
, and the 2nd function depends on the first one.
Either<Error, bool> either1 = ReturnEither1(...);
Either<Error, int> either2 = either1.Bind(ReturnEither2);
Now, I have a 3rd function which depends on both either1
and either2
and its left type is also Error
. How can I do something like below?
Either<Error, MyType> either3 = [either1, either2].BindAll(...);
So I want either3
to bind to the right of both either1
and either2
.