Sometime, I need to write a very simple enum type. Result type in std is not suitable for some cases, because the two variants in Result type suggest very different intentions.
I would very happy to see a generic Either type in std:
enum Either<T1, T2> {
Left(T1),
Right(T2),
}
If we can leverage variadic generics, it can be designed even better.
We could think of it as counterpart of tuple for convenience, one is for product type and the other is for sum type.
Is this type qualified to be added into std?