Class

cats.syntax

CoproductOps

Related Doc: package syntax

Permalink

final class CoproductOps[F[_], A] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CoproductOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CoproductOps(fa: F[A])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val fa: F[A]

    Permalink
  6. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def leftc[G[_]]: Coproduct[F, G, A]

    Permalink

    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[_].

    See also

    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)))
  9. def rightc[G[_]]: Coproduct[G, F, A]

    Permalink

    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[_].

    See also

    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)))
  10. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped