ApplicativeLocal[F, E] lets you alter the E value that is observed by an F[A] value
using ask; the modification can only be observed from within that F[A] value.
ApplicativeLocal[F, E] has three external laws:
def askReflectsLocal(f: E => E) = {
local(f)(ask) <-> ask map f
}
def localPureIsPure[A](a: A, f: E => E) = {
local(f)(pure(a)) <-> pure(a)
}
def localDistributesOverAp[A, B](fa: F[A], ff: F[A => B], f: E => E) = {
local(f)(ff ap fa) <-> local(f)(ff) ap local(f)(fa)
}
ApplicativeLocal[F, E]
lets you alter theE
value that is observed by anF[A]
value usingask
; the modification can only be observed from within thatF[A]
value.ApplicativeLocal[F, E]
has three external laws:ApplicativeLocal
has one internal law: