Slide 40
Slide 40 text
EitherT とは
※ https://github.com/typelevel/cats/blob/v2.12.0/core/src/main/scala/cats/data/EitherT.scala より
final case class EitherT[F[_], A, B](value: F[Either[A, B]]) {
// ...
def map[D](f: B => D)(implicit F: Functor[F]): EitherT[F, A, D] = ...
def flatMap[AA >: A, D](f: B => EitherT[F, AA, D])(implicit F: Monad[F]): EitherT[F, AA, D] = ...
// ...
}
object EitherT extends EitherTInstances {
// ...
final def pure[F[_], A]: PurePartiallyApplied[F, A] = ...
final def fromEither[F[_]]: FromEitherPartiallyApplied[F] = ...
// ...
}