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 Reader<Env, A> ToReader () Source #

Convert to a Reader

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

where M : Monad<M>, SemiAlternative<M>

Convert to a ReaderT

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

where M : Monad<M>, SemiAlternative<M>, ReaderM<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>, SemiAlternative<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

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>, SemiAlternative<M>, ReaderM<M, Env>

Monadic bind with any Reader