Applicative

object Applicative
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

trait AllOps[F[_], A] extends Ops[F, A] with AllOps[F, A] with AllOps[F, A]
trait Ops[F[_], A] extends Serializable
trait ToApplicativeOps extends Serializable

Deprecated classlikes

@deprecated("Use cats.syntax object imports", "2.2.0")
Deprecated
@deprecated("Use cats.syntax object imports", "2.2.0")
object ops
Deprecated

Value members

Concrete methods

@inline
def apply[F[_]](instance: Applicative[F]): Applicative[F]

Summon an instance of Applicative for F.

Summon an instance of Applicative for F.

def catsApplicativeForArrow[F[_, _], A](F: Arrow[F]): Applicative[[_] =>> F[A, _$7]]

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.implicits._
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)
def coflatMap[F[_]](F: Applicative[F]): CoflatMap[F]

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

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

Example:

scala> import cats._
scala> import cats.implicits._
scala> val fa = Some(3)
fa: Option[Int] = Some(3)
scala> Applicative.coflatMap[Option].coflatten(fa)
res0: Option[Option[Int]] = Some(Some(3))
def monoid[F[_], A](f: Applicative[F], monoid: Monoid[A]): Monoid[F[A]]