cats.mtl
ApplicativeAsk[F, E] lets you access an E value in the F[_] context.
ApplicativeAsk[F, E]
E
F[_]
Intuitively, this means that an E value is required as an input to get "out" of the F[_] context.
ApplicativeAsk[F, E] has one external law:
def askAddsNoEffects[A](fa: F[A]) = { (ask *> fa) <-> fa }
ApplicativeAsk[F, E] has one internal law:
def readerIsAskAndMap[A](f: E => A) = { ask.map(f) <-> reader(f) }
ApplicativeAsk[F, E]
lets you access anE
value in theF[_]
context.Intuitively, this means that an
E
value is required as an input to get "out" of theF[_]
context.ApplicativeAsk[F, E]
has one external law:ApplicativeAsk[F, E]
has one internal law: