tofu.control.Bind
See theBind companion object
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait StackSafeBind[F]
- Self type
-
Bind[F]
Members list
Value members
Abstract methods
def foldRec[E, A, X, B](init: Either[E, A])(step: (Either[E, A]) => F[Either[E, X], Either[A, B]]): F[X, B]
Concrete methods
Inherited methods
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.syntax.all._
scala> val x: (List[String], Int) = (List("foo", "bar"), 3)
scala> x.bimap(_.headOption, _.toLong + 1)
res0: (Option[String], Long) = (Some(foo),4)
Attributes
- Inherited from:
- TwinMonad
The composition of two Bifunctors is itself a Bifunctor
The composition of two Bifunctors is itself a Bifunctor
Attributes
- Inherited from:
- Bifunctor
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- Bifunctor
Lift left into F using Applicative.
Lift left into F using Applicative.
- Example:
scala> import cats.implicits._
scala> val x0: Either[String, Int] = Either.left("foo")
scala> val x1: Either[List[String], Int] = x0.leftLiftTo[List]
Attributes
- Inherited from:
- Bifunctor
apply a function to the "left" functor
apply a function to the "left" functor
Attributes
- Inherited from:
- Bifunctor
Widens A into a supertype AA. Example:
Widens A into a supertype AA. Example:
scala> import cats.syntax.all._
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
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- Bifunctor
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
Attributes
- Inherited from:
- TwinMonad
In this article