Either[A, B] are very useful and commonly used types. Very often we want to combine them, but a
Future[Either[A, B]] is kind of awkward to handle not only because we don't want to have to call
Still it can be quite unwieldy to compose values of this new type with other values of different types.
To get nice composability (e.g. with
for comprehensions) we have to wrap other values into the new type by lifting them up inside the monad stack.
Here are the most convenient ways that I found to do that.
Continue reading →