I have the result of a method:
val res: Future[Int] Xor Future[String] = getResult(x)
and would like to transform it and use it as Future[Int Xor String]
I could not extrapolate my use case from the herding cats blog and am not sure whether a monad transformer would be the right tool here, perhaps rather some form of traverse
?
Xor
from cats stands in for any disjunction. Scalaz \/
or stdlib Either
would be fine as well (though I would prefer a biased disjunction).
Thank you