Lift an F[A]
into a Coproduct[F, G, A]
for any type constructor G[_]
.
Lift an F[A]
into a Coproduct[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.Coproduct scala> import cats.Eval scala> import cats.syntax.coproduct._ scala> List(1, 2, 3).leftc[Eval] res0: Coproduct[List, Eval, Int] = Coproduct(Left(List(1, 2, 3)))
Lift an F[A]
into a Coproduct[G, F, A]
for any type constructor G[_]
.
Lift an F[A]
into a Coproduct[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.Coproduct scala> import cats.Eval scala> import cats.syntax.coproduct._ scala> List(1, 2, 3).rightc[Eval] res0: Coproduct[Eval, List, Int] = Coproduct(Right(List(1, 2, 3)))