cats.Applicative$
See theApplicative companion trait
object Applicative
Attributes
- Companion
- trait
- Source
- Applicative.scala
- Graph
-
- Supertypes
- Self type
-
Applicative.type
Members list
Type members
Classlikes
Attributes
- Source
- Applicative.scala
- Supertypes
- Known subtypes
trait Ops[F[_], A] extends Serializable
Attributes
- Source
- Applicative.scala
- Supertypes
- Known subtypes
trait ToApplicativeOps extends Serializable
Attributes
- Source
- Applicative.scala
- Supertypes
- Known subtypes
-
object nonInheritedOps.type
Deprecated classlikes
object nonInheritedOps extends ToApplicativeOps
Attributes
- Deprecated
- true
- Source
- Applicative.scala
- Supertypes
- Self type
-
nonInheritedOps.type
object ops
Attributes
- Deprecated
- true
- Source
- Applicative.scala
- Supertypes
- Self type
-
ops.type
Value members
Concrete methods
Summon an instance of Applicative for F
.
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
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
In this article