Function1Ops

final class Function1Ops[F[_], A, B](fab: F[A => B])(`evidence$3`: Functor[F])
class Object
trait Matchable
class Any

Value members

Concrete methods

def mapApply(a: A): F[B]

Given a function in the Functor context and a plain value, supplies the value to the function.

Given a function in the Functor context and a plain value, supplies the value to the function.

Example:

scala> import cats.implicits._

scala> val someF: Option[Int => Long] = Some(_.toLong + 1L)
scala> val noneF: Option[Int => Long] = None
scala> val anInt: Int = 3

scala> someF.mapApply(anInt)
res0: Option[Long] = Some(4)

scala> noneF.mapApply(anInt)
res1: Option[Long] = None