LanguageExt.Core

LanguageExt.Core Monads Alternative Monads ChronicleT Extensions

Contents

class ChronicleTExtensions Source #

Methods

method ChronicleT<Ch, M, A> As <Ch, M, A> (this K<ChronicleT<Ch, M>, A> ma) Source #

where M : Monad<M>

Downcast operator

method ChronicleT<Ch, M, A> As2 <Ch, M, A> (this K<ChronicleT<M>, Ch, A> ma) Source #

where M : Monad<M>

Downcast operator

method K<M, These<Ch, A>> Run <Ch, M, A> (this K<ChronicleT<Ch, M>, A> ma) Source #

where Ch : Semigroup<Ch>
where M : Monad<M>

Run the chronicle to yield its inner monad

method ChronicleT<Ch, M, A> Flatten <Ch, M, A> (this ChronicleT<Ch, M, ChronicleT<Ch, M, A>> mma) Source #

where M : Monad<M>

Monadic join

method ChronicleT<Ch, M, B> BiMap <Ch, M, A, B> ( this ChronicleT<Ch, M, A> ma, Func<A, B> f) Source #

where Ch : Semigroup<Ch>
where M : Monad<M>

Functor map operation

Parameters

type B

Dictation type to map to

param f

Dictation mapping function

returns

method ChronicleT<Ch1, M, B> BiMap <Ch, Ch1, M, A, B> ( this ChronicleT<Ch, M, A> ma, Func<Ch, Ch1> This, Func<A, B> That) Source #

where Ch : Semigroup<Ch>
where Ch1 : Semigroup<Ch1>
where M : Monad<M>

Bifunctor map operation

Parameters

type Ch1

Chronicle type to map to

type B

Dictation type to map to

param This

Chronicle mapping function

param That

Dictation mapping function

returns

method ChronicleT<Ch, M, A> Where <Ch, M, A> (this K<ChronicleT<Ch, M>, A> ma, Func<A, bool> pred) Source #

where Ch : Monoid<Ch>
where M : Monad<M>

Filtering based on predicate.

If the predicate returns false, then ChronicleT.empty() is yielded and therefore Ch must be a monoid.

method ChronicleT<Ch, M, A> Filter <Ch, M, A> (this K<ChronicleT<Ch, M>, A> ma, Func<A, bool> pred) Source #

where Ch : Monoid<Ch>
where M : Monad<M>

Filtering based on predicate.

If the predicate returns false, then ChronicleT.empty() is yielded and therefore Ch must be a monoid.

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

where Ch : Semigroup<Ch>
where M : Monad<M>

Monad bind operation

Parameters

type A

Source bound value type

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

EitherT

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

where Ch : Semigroup<Ch>
where M : Monad<M>

Monad bind operation

Parameters

type A

Source bound value type

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

EitherT

class ChronicleTGuardExtensions Source #

Methods

method ChronicleT<Ch, M, Unit> ToChronicleT <Ch, M> (this Guard<Ch, Unit> guard) Source #

where M : Monad<M>

Natural transformation to ChronicleT

method ChronicleT<Ch, M, B> Bind <Ch, M, B> ( this Guard<Ch, Unit> guard, Func<Unit, ChronicleT<Ch, M, B>> f) Source #

where M : Monad<M>

Monadic binding support for ChronicleT

method ChronicleT<Ch, M, C> SelectMany <Ch, M, B, C> ( this Guard<Ch, Unit> guard, Func<Unit, ChronicleT<Ch, M, B>> bind, Func<Unit, B, C> project) Source #

where M : Monad<M>

Monadic binding support for ChronicleT