LanguageExt.Core

LanguageExt.Core Monads State and Environment Monads Writer WriterT Extensions

Contents

class WriterTExtensions Source #

Methods

method WriterT<W, M, A> As <W, M, A> (this K<WriterT<W, M>, A> ma) Source #

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

method K<M, (A Value, W Output)> Run <W, M, A> (this K<WriterT<W, M>, A> ma) Source #

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

Run the writer

Parameters

returns

Bound monad

method K<M, (A Value, W Output)> Run <W, M, A> (this K<WriterT<W, M>, A> ma, W initial) Source #

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

Run the writer

Parameters

returns

Bound monad

method WriterT<W, M, A> Flatten <W, M, A> (this WriterT<W, M, WriterT<W, M, A>> mma) Source #

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

Monadic join

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

where W : Monoid<W>
where M : Monad<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

StateT

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

where W : Monoid<W>
where M : Monad<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

StateT