1
正如标题所述。扁平化未来[EitherT [未来,A,B]]
使用EitherT[Future, A, B]
完成了许多操作。有时我想要通过另一个签名为A => Future[C]
的操作向左或向右映射。其他情况是EitherT[Future, A, B]
对未来产生的Future[EitherT[Future, A, B]]
的映射结果。
我怎样才能优雅地变平类型,如:
EitherT[Future, Future[A], Future[B]]
和Future[EitherT[Future, A, B]]
预先感谢您。