cats.arrow

package cats.arrow

Type members

Classlikes

@implicitNotFound("Could not find an instance of Arrow for ${F}") @typeclass
trait Arrow[F[_, _]] extends Category[F] with Strong[F]

Must obey the laws defined in cats.laws.ArrowLaws.

Must obey the laws defined in cats.laws.ArrowLaws.

Companion
object
object Arrow
Companion
class
@implicitNotFound("Could not find an instance of ArrowChoice for ${F}") @typeclass
trait ArrowChoice[F[_, _]] extends Arrow[F] with Choice[F]

Must obey the laws defined in cats.laws.ArrowChoiceLaws.

Must obey the laws defined in cats.laws.ArrowChoiceLaws.

Companion
object
object ArrowChoice
Companion
class
@implicitNotFound("Could not find an instance of Category for ${F}") @typeclass
trait Category[F[_, _]] extends Compose[F]

Must obey the laws defined in cats.laws.CategoryLaws.

Must obey the laws defined in cats.laws.CategoryLaws.

Companion
object
object Category
Companion
class
@implicitNotFound("Could not find an instance of Choice for ${F}") @typeclass
trait Choice[F[_, _]] extends Category[F]
Companion
object
object Choice
Companion
class
@implicitNotFound("Could not find an instance of CommutativeArrow for ${F}") @typeclass
trait CommutativeArrow[F[_, _]] extends Arrow[F]

In a Commutative Arrow F[_, _], the split operation (or ***) is commutative, which means that there is non-interference between the effect of the paired arrows.

In a Commutative Arrow F[_, _], the split operation (or ***) is commutative, which means that there is non-interference between the effect of the paired arrows.

Must obey the laws in CommutativeArrowLaws

Companion
object
Companion
class
@implicitNotFound("Could not find an instance of Compose for ${F}") @typeclass
trait Compose[F[_, _]] extends Serializable

Must obey the laws defined in cats.laws.ComposeLaws.

Must obey the laws defined in cats.laws.ComposeLaws.

Here's how you can use >>> and <<< Example:

scala> import cats.implicits._
scala> val f : Int => Int = (_ + 1)
scala> val g : Int => Int = (_ * 100)
scala> (f >>> g)(3)
res0: Int = 400
scala> (f <<< g)(3)
res1: Int = 301
Companion
object
object Compose
Companion
class
trait FunctionK[F[_], G[_]] extends Serializable

FunctionK[F[_], G[_]] is a functor transformation from F to G in the same manner that function A => B is a morphism from values of type A to B. An easy way to create a FunctionK instance is to use the Polymorphic lambdas provided by typelevel/kind-projector v0.9+. E.g.

FunctionK[F[_], G[_]] is a functor transformation from F to G in the same manner that function A => B is a morphism from values of type A to B. An easy way to create a FunctionK instance is to use the Polymorphic lambdas provided by typelevel/kind-projector v0.9+. E.g.

 val listToOption = λ[FunctionK[List, Option]](_.headOption)
Companion
object
object FunctionK extends FunctionKMacroMethods
Companion
class
@implicitNotFound("Could not find an instance of Profunctor for ${F}") @typeclass
trait Profunctor[F[_, _]] extends Serializable

A Profunctor is a Contravariant functor on its first type parameter and a Functor on its second type parameter.

A Profunctor is a Contravariant functor on its first type parameter and a Functor on its second type parameter.

Must obey the laws defined in cats.laws.ProfunctorLaws.

Companion
object
object Profunctor
Companion
class
@implicitNotFound("Could not find an instance of Strong for ${F}") @typeclass
trait Strong[F[_, _]] extends Profunctor[F]

Must obey the laws defined in cats.laws.StrongLaws.

Must obey the laws defined in cats.laws.StrongLaws.

Companion
object
object Strong
Companion
class