Lift an F[A]
into a EitherK[F, G, A]
for any type constructor G[_]
.
Lift an F[A]
into a EitherK[F, G, A]
for any type constructor G[_]
.
rightc to swap the order of F
and G
in the result type.
Example:
scala> import cats.data.EitherK scala> import cats.Eval scala> import cats.implicits._ scala> List(1, 2, 3).leftc[Eval] res0: EitherK[List, Eval, Int] = EitherK(Left(List(1, 2, 3)))
Lift an F[A]
into a EitherK[G, F, A]
for any type constructor G[_]
.
Lift an F[A]
into a EitherK[G, F, A]
for any type constructor G[_]
.
leftc to swap the order of F
and G
in the result type.
Example:
scala> import cats.data.EitherK scala> import cats.Eval scala> import cats.implicits._ scala> List(1, 2, 3).rightc[Eval] res0: EitherK[Eval, List, Int] = EitherK(Right(List(1, 2, 3)))