BIOCatsBifunctor

izumi.functional.bio.CatsConversions$.BIOCatsBifunctor
trait BIOCatsBifunctor[F[_, _]] extends Bifunctor[F]

Attributes

Graph
Supertypes
trait Bifunctor[F]
trait Serializable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def F: Bifunctor2[F]

Concrete methods

final override def bimap[A, B, C, D](fab: F[A, B])(f: A => C, g: B => D): F[C, D]

The quintessential method of the Bifunctor trait, it applies a function to each "side" of the bifunctor.

The quintessential method of the Bifunctor trait, it applies a function to each "side" of the bifunctor.

Example:

scala> import cats.implicits._

scala> val x: (List[String], Int) = (List("foo", "bar"), 3)
scala> x.bimap(_.headOption, _.toLong + 1)
res0: (Option[String], Long) = (Some(foo),4)

Attributes

Definition Classes
Bifunctor
final override def leftMap[A, B, C](fab: F[A, B])(f: A => C): F[C, B]

apply a function to the "left" functor

apply a function to the "left" functor

Attributes

Definition Classes
Bifunctor

Inherited methods

def compose[G[_, _]](implicit G0: Bifunctor[G]): Bifunctor[[α, β] =>> F[G[α, β], G[α, β]]]

The composition of two Bifunctors is itself a Bifunctor

The composition of two Bifunctors is itself a Bifunctor

Attributes

Inherited from:
Bifunctor
def leftFunctor[X]: Functor[F]

Attributes

Inherited from:
Bifunctor
def leftWiden[A, B, AA >: A](fab: F[A, B]): F[AA, B]

Widens A into a supertype AA. Example:

Widens A into a supertype AA. Example:

scala> import cats.implicits._
scala> sealed trait Foo
scala> case object Bar extends Foo
scala> val x1: Either[Bar.type, Int] = Either.left(Bar)
scala> val x2: Either[Foo, Int] = x1.leftWiden

Attributes

Inherited from:
Bifunctor
def rightFunctor[X]: Functor[[_] =>> F[X, _$3]]

Attributes

Inherited from:
Bifunctor