How to convert from Seq of either to Either of a S

2019-09-02 08:52发布

问题:

Possible Duplicate:
Best way to turn a Lists of Eithers into an Either of Lists?
How to reduce a Seq[Either[A,B]] to a Either[Seq[A],Seq[B]]

In Scala, what is an idiomatic way to convert from

from:

Seq[Either[Seq[String], ResearchId]]

to:

Either[Seq[String], Seq[ResearchId]]
标签: scala