You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flatten_left is just flatten on std::Result, but it is nice to have corresponding left and right methods to strengthen the intuition that there is nothing special with the left or the right variant, they are both considered equal.
I am fine with doing the implementation itself but I would be glad about comments, naming suggestions and general suggestions! Do you think this would be useful? Maybe it would be confusing with flatten and into_inner doing the same thing so I am fine with dropping that, but flatten_left and flatten_right seems useful imo.
The text was updated successfully, but these errors were encountered:
I think the Either crate is really good, and here are some methods I would love to see:
flatten
I think there should be a flatten method, like for
std::Result
andstd::Option
:As you can see from the implementation, this is the same as
into_inner
but I think it is good to have this for two reasons:One alternative may be to let
flatten
use anyEither<T,T>
(and thus skipcombine
).flatten_right
/flatten_left
Two more propsed functions are
flatten_right
andflatten_left
:flatten_left
is justflatten
onstd::Result
, but it is nice to have corresponding left and right methods to strengthen the intuition that there is nothing special with the left or the right variant, they are both considered equal.I am fine with doing the implementation itself but I would be glad about comments, naming suggestions and general suggestions! Do you think this would be useful? Maybe it would be confusing with flatten and into_inner doing the same thing so I am fine with dropping that, but flatten_left and flatten_right seems useful imo.
The text was updated successfully, but these errors were encountered: