arrow-mtl / arrow.mtl.typeclasses / MonadReader

MonadReader

interface MonadReader<F, D> : Monad<F>

Functions

ask abstract fun ask(): Kind<F, D>
Get the environment
local abstract fun <A> Kind<F, A>.local(f: (D) -> D): Kind<F, A>
Modify the environment
reader open fun <A> reader(f: (D) -> A): Kind<F, A>
Retrieves a function of the environment

Inheritors

Function1MonadReader interface Function1MonadReader<I> : MonadReader<Function1PartialOf<I>, I>, Function1Monad<I>
KleisliMonadReader interface KleisliMonadReader<F, D> : MonadReader<KleisliPartialOf<F, D>, D>, KleisliMonad<F, D>

Type Class Hierarchy