I am facing an issue while I am trying to resolve the result of a method. More specifically I have:
def methodA(): Future[Either[Error, Seq[A]]]
and at some point, I want to call this method for each element of a list and merge the result. Something like this:
val tes: Seq[Future[Either[Error, Seq[A]]]] = relevantRounds.map(round =>
methodA()
)
Do you know how I can resolve the Seq[Future[Either[Error, Seq[A]]]]
?
So what I finally want is
Future[Either[Error, Seq[A]]]
with a sequence which contains the result of the whole list.