LanguageExt.Core

LanguageExt.Core Monads State and Environment Monads State

Contents

Sub modules

State
StateT

record Put <S> (S Value) Source #

State put

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

Parameters

type S

State type

param F

Mapping from the environment

Methods

method StateT<S, M, Unit> ToStateT <M> () Source #

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

Convert ot a StateT

method State<S, Unit> ToState () Source #

Convert ot a StateT

method StateT<S, M, C> SelectMany <M, B, C> (Func<Unit, StateT<S, M, B>> bind, Func<Unit, B, C> project) Source #

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

Convert ot a State

Monadic bind with StateT

method State<S, C> SelectMany <B, C> (Func<Unit, State<S, B>> bind, Func<Unit, B, C> project) Source #

Monadic bind with State

record Modify <S> (Func<S, S> f) Source #

State modify

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

Parameters

type S

State type

param f

Mapping from the environment

Methods

method StateT<S, M, Unit> ToStateT <M> () Source #

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

Convert ot a StateT

method State<S, Unit> ToState () Source #

Convert ot a State

method StateT<S, M, C> SelectMany <M, B, C> (Func<Unit, StateT<S, M, B>> bind, Func<Unit, B, C> project) Source #

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

Monadic bind with StateT

method State<S, C> SelectMany <B, C> (Func<Unit, State<S, B>> bind, Func<Unit, B, C> project) Source #

Monadic bind with State

record Gets <S, A> (Func<S, A> f) Source #

State modify

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

Parameters

type S

State type

param f

Mapping from the environment

Methods

method StateT<S, M, A> ToStateT <M> () Source #

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

Convert ot a StateT

method State<S, A> ToState () Source #

Convert ot a State

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

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

Monadic bind with StateT

method State<S, C> SelectMany <B, C> (Func<A, State<S, B>> bind, Func<A, B, C> project) Source #

Monadic bind with State