LanguageExt.Core

LanguageExt.Core Effects Eff Eff with runtime Extensions

Contents

class EffExtensions Source #

Methods

method Eff<RT, A> As () Source #

Cast type to its Kind

method Fin<A> Run (RT env) Source #

Invoke the effect

Returns the result value only

method Fin<A> Run (RT env, EnvIO envIO) Source #

Invoke the effect

Returns the result value only

method A RunUnsafe (RT env) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method A RunUnsafe (RT env, EnvIO envIO) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method IO<A> RunIO (RT env) Source #

Invoke the effect to leave the inner IO monad

method Task<Fin<A>> RunAsync (RT env) Source #

Invoke the effect

Returns the result value only

method Task<Fin<A>> RunAsync (RT env, EnvIO envIO) Source #

Invoke the effect

Returns the result value only

method ValueTask<A> RunUnsafeAsync (RT env) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method ValueTask<A> RunUnsafeAsync (RT env, EnvIO envIO) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

class EffExtensions Source #

Methods

method Eff<RT, B> Map <RT, A, B> (this Func<A, B> f, K<Eff<RT>, A> ma) Source #

Functor map operation

Unwraps the value within the functor, passes it to the map function f provided, and then takes the mapped value and wraps it back up into a new functor.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method Eff<RT, B> Map <RT, A, B> (this Func<A, B> f, Eff<RT, A> ma) Source #

Functor map operation

Unwraps the value within the functor, passes it to the map function f provided, and then takes the mapped value and wraps it back up into a new functor.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method Eff<RT, B> Action <RT, A, B> ( this Eff<RT, A> ma, Eff<RT, B> mb) Source #

Applicative action: runs the first applicative, ignores the result, and returns the second applicative

method Eff<RT, B> Apply <RT, A, B> (this Eff<RT, Func<A, B>> mf, K<Eff<RT>, A> ma) Source #

Applicative functor apply operation

Unwraps the value within the ma applicative-functor, passes it to the unwrapped function(s) within mf, and then takes the resulting value and wraps it back up into a new applicative-functor.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor

method Eff<RT, B> Apply <RT, A, B> (this K<Eff<RT>, Func<A, B>> mf, K<Eff<RT>, A> ma) Source #

Applicative functor apply operation

Unwraps the value within the ma applicative-functor, passes it to the unwrapped function(s) within mf, and then takes the resulting value and wraps it back up into a new applicative-functor.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor

class EffExtensions Source #

Methods

method Eff<RT, Unit> ToEff <RT> (this Guard<Error, Unit> guard) Source #

Natural transformation to Eff

method Eff<RT, B> Bind <RT, B> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> f) Source #

Monadic binding support for Eff

method Eff<RT, C> SelectMany <RT, B, C> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> bind, Func<Unit, B, C> project) Source #

Monadic binding support for Eff