cIn haskell i can have :
do
result1 <- IOaction1
result2 <- IOaction2
doSomethingWith result1 result2
How can i achive this in C# with LanguageExt ?
Edit
EitherAsync<string,int> x = TryAsync<int>(new Exception()).ToEither(err=>"sgp");
EitherAsync<string,int> y = TryAsync<int>(new Exception()).ToEither(err => "str");
How can i now perform a bind over x
and then over y
, and unwrap both values and use them in a new method to wrap the result ?
Something like:
x.Bind y.Bind
-> (int xUnwrapped,int yUnwrapped) -> RightAsync<string,int>(xUnwrapped+yUnwrapped)