object Applicative
- Companion
- class
class Object
trait Matchable
class Any
Type members
Classlikes
Value members
Concrete methods
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)
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))