Contents
- Reader <Env, A> (Func<Env, A> runReader)
- Pure (A value)
- Asks (Func<Env, A> f)
- AsksM (Func<Env, Reader<Env, A>> f)
- Lift (Pure<A> monad)
- Lift (Func<A> f)
- With <Env1> (Func<Env1, Env> f)
- Local (Func<Env, Env> f)
- Map <B> (Func<A, B> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, K<Reader<Env>, B>> f)
- Bind <B> (Func<A, Reader<Env, B>> f)
- Bind <B> (Func<A, Ask<Env, B>> f)
- SelectMany <B, C> (Func<A, K<Reader<Env>, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Reader<Env, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Ask<Env, B>> bind, Func<A, B, C> project)
- Run (Env env)
- Reader
Sub modules
| Extensions |
| Operators |
| Trait |
record Reader <Env, A> (Func<Env, A> runReader) Source #
Reader monad transformer, which adds a static environment to a given monad.
Parameters
| type | Env | Reader environment type |
| type | M | Given monad trait |
| type | A | Bound value type |
Methods
method Reader<Env, A> Pure (A value) Source #
Lift a pure value into the monad-transformer
Parameters
| param | value | Value to lift |
| returns |
| |
method Reader<Env, A> Asks (Func<Env, A> f) Source #
Extracts the environment value and maps it to the bound value
Parameters
| param | f | Environment mapping function |
| returns |
| |
method Reader<Env, A> AsksM (Func<Env, Reader<Env, A>> f) Source #
Extracts the environment value and maps it to the bound value
Parameters
| param | f | Environment mapping function |
| returns |
| |
method Reader<Env, A> Lift (Pure<A> monad) Source #
Lifts a given monad into the transformer
Parameters
| param | monad | Monad to lift |
| returns |
| |
method Reader<Env, A> Lift (Func<A> f) Source #
Lifts a unit function into the transformer
Parameters
| param | f | Function to lift |
| returns |
| |
method Reader<Env1, A> With <Env1> (Func<Env1, Env> f) Source #
Maps the Reader's environment value
Parameters
| param | f | Mapping function |
| returns |
| |
method Reader<Env, A> Local (Func<Env, Env> f) Source #
Maps the Reader's environment value
Parameters
| param | f | Mapping function |
| returns |
| |
method Reader<Env, B> Map <B> (Func<A, B> f) Source #
Maps the bound value
Parameters
| type | B | Target bound value type |
| param | f | Mapping function |
| returns |
| |
method Reader<Env, B> Select <B> (Func<A, B> f) Source #
Maps the bound value
Parameters
| type | B | Target bound value type |
| param | f | Mapping transducer |
| returns |
| |
method Reader<Env, B> Bind <B> (Func<A, K<Reader<Env>, B>> f) Source #
Monad bind operation
Parameters
| type | B | Target bound value type |
| param | f | Mapping function |
| returns |
| |
method Reader<Env, B> Bind <B> (Func<A, Reader<Env, B>> f) Source #
Monad bind operation
Parameters
| type | B | Target bound value type |
| param | f | Mapping function |
| returns |
| |
method Reader<Env, B> Bind <B> (Func<A, Ask<Env, B>> f) Source #
Monad bind operation
Parameters
| type | B | Target bound value type |
| param | f | Mapping function |
| returns |
| |
method Reader<Env, C> SelectMany <B, C> (Func<A, K<Reader<Env>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
method Reader<Env, C> SelectMany <B, C> (Func<A, Reader<Env, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
method Reader<Env, C> SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
method Reader<Env, C> SelectMany <B, C> (Func<A, Ask<Env, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
Methods