LanguageExt.Core

LanguageExt.Core Monads State and Environment Monads Reader

Contents

Sub modules

Reader
ReaderT

record Ask <Env, A> (Func<Env, A> F) Source #

Reader ask

This is a convenience type that is created by the Prelude ask function. It avoids the need for lots of generic parameters when used in ReaderT and Reader based monads.

Parameters

type Env

Reader environment type

type A

Type to map to

param F

Mapping from the environment

Methods

method K<M, A> ToReadable <M> () Source #

where M : Readable<M, Env>

Use a Readable trait to convert to an M<A>

method Reader<Env, A> ToReader () Source #

Convert to a Reader

method ReaderT<Env, M, A> ToReaderT <M> () Source #

where M : Monad<M>, Choice<M>

Convert to a ReaderT

method RWST<Env, W, S, M, A> ToRWST <W, S, M> () Source #

where W : Monoid<W>
where M : Monad<M>, Choice<M>

Convert to a RWS

Convert to a RWST

method K<M, C> SelectMany <M, B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>, Choice<M>, Readable<M, Env>

Monadic bind with any Reader

method ReaderT<Env, M, C> SelectMany <M, B, C> (Func<A, ReaderT<Env, M, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>, Choice<M>

Monadic bind with ReaderT

method ReaderT<Env, M, C> SelectMany <M, B, C> (Func<A, K<ReaderT<Env, M>, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>, Choice<M>

Monadic bind with ReaderT

method Reader<Env, C> SelectMany <B, C> (Func<A, Reader<Env, B>> bind, Func<A, B, C> project) Source #

Monadic bind with Reader

method Reader<Env, C> SelectMany <B, C> (Func<A, K<Reader<Env>, B>> bind, Func<A, B, C> project) Source #

Monadic bind with Reader

method RWST<Env, W, S, M, C> SelectMany <W, S, M, B, C> ( Func<A, RWST<Env, W, S, M, B>> bind, Func<A, B, C> project) Source #

where W : Monoid<W>
where M : Monad<M>, Choice<M>

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

ReaderT

method RWST<Env, W, S, M, C> SelectMany <W, S, M, B, C> ( Func<A, K<RWST<Env, W, S, M>, B>> bind, Func<A, B, C> project) Source #

where W : Monoid<W>
where M : Monad<M>, Choice<M>

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

ReaderT

class AskExtensions Source #

Methods

method K<M, C> SelectMany <Env, M, A, B, C> ( this K<M, A> ma, Func<A, Ask<Env, B>> bind, Func<A, B, C> project) Source #

where M : Monad<M>, Choice<M>, Readable<M, Env>

Monadic bind with any Reader