Applicative

cats.Applicative$
See theApplicative companion trait
object Applicative

Attributes

Companion
trait
Source
Applicative.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait AllOps[F[_], A] extends Ops[F, A], AllOps[F, A], AllOps[F, A]

Attributes

Source
Applicative.scala
Supertypes
trait AllOps[F, A]
trait Ops[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait Ops[F, A]
trait Ops[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait Ops[F, A]
trait Ops[F, A]
trait Ops[F, A]
trait Ops[F, A]
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
Show all
trait Ops[F[_], A] extends Serializable

Attributes

Source
Applicative.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
trait AllOps[F, A]
Show all

Attributes

Source
Applicative.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object nonInheritedOps.type

Deprecated classlikes

Attributes

Deprecated
true
Source
Applicative.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
object ops

Attributes

Deprecated
true
Source
Applicative.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ops.type

Value members

Concrete methods

def apply[F[_]](implicit instance: Applicative[F]): Applicative[F]

Summon an instance of Applicative for F.

Summon an instance of Applicative for F.

Attributes

Source
Applicative.scala
def catsApplicativeForArrow[F[_, _], A](implicit F: Arrow[F]): Applicative[[_] =>> F[A, _$16]]

Creates an applicative functor for F, holding domain fixed and combining over the codomain.

Creates an applicative functor for F, holding domain fixed and combining over the codomain.

Example:

scala> import cats.syntax.all._
scala> import cats.Applicative.catsApplicativeForArrow
scala> val toLong: Int => Long = _.toLong
scala> val double: Int => Int = 2*_
scala> val f: Int => (Long, Int) = catsApplicativeForArrow[Function1, Int].product(toLong, double)
scala> f(3)
res0: (Long, Int) = (3,6)

Attributes

Source
Applicative.scala
def coflatMap[F[_]](implicit F: Applicative[F]): CoflatMap[F]

Creates a CoflatMap for an Applicative F.

Creates a CoflatMap for an Applicative F. Cannot be implicit in 1.0 for Binary Compatibility Reasons

Example:

scala> import cats._
scala> import cats.syntax.all._
scala> val fa = Some(3)
fa: Option[Int] = Some(3)
scala> Applicative.coflatMap[Option].coflatten(fa)
res0: Option[Option[Int]] = Some(Some(3))

Attributes

Source
Applicative.scala
def monoid[F[_], A](implicit f: Applicative[F], monoid: Monoid[A]): Monoid[F[A]]

Attributes

Source
Applicative.scala