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 K<M, Unit> ToStateful <M> () Source #

where M : Stateful<M, S>

Convert to a Stateful

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

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

Convert to a StateT

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

Convert to 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>, Choice<M>

Monadic bind

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

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

Monadic bind

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

Monadic bind

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

Monadic bind

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

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

Monadic bind

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

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

Monadic bind

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 K<M, Unit> ToStateful <M> () Source #

where M : Stateful<M, S>

Convert with Stateful

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

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

Convert to a StateT

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

Convert to 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>, Choice<M>

Monadic bind

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

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

Monadic bind

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

Monadic bind

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

Monadic bind

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

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

Monadic bind

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

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

Monadic bind

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 K<M, A> ToStateful <M> () Source #

where M : Stateful<M, S>

Convert with Stateful

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

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

Monadic bind

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

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

Monadic bind

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

Monadic bind

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

Monadic bind

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

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

Monadic bind

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

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

Monadic bind