either< L, R >

A value of type L or R.

This is an elegant way to model a union of 2 elements.

Either can be used to model a result that will be one of two values, or a expected result and well-defined error condition from a service method. For a more generic error result try< T > can be used.