LanguageExt.Core

LanguageExt.Core Effects Eff Eff with runtime Extensions

Contents

class EffExtensions Source #

Methods

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

method Eff<RT, E> Apply <RT, A, B, C, D, E> ( this K<Eff<RT>, Func<A, B, C, D, E>> mf, K<Eff<RT>, A> ma, K<Eff<RT>, B> mb, K<Eff<RT>, C> mc, K<Eff<RT>, D> md) Source #

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

method Eff<RT, Func<D, E>> Apply <RT, A, B, C, D, E> ( this K<Eff<RT>, Func<A, B, C, D, E>> mf, K<Eff<RT>, A> ma, K<Eff<RT>, B> mb, K<Eff<RT>, C> mc) Source #

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

Applicative apply: takes the lifted function and the lifted argument, applies the function to the argument and returns the result, lifted.

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

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

class EffExtensions Source #

Methods

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

Cast type to its Kind

method Fin<A> Run <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

Returns the result value only

method Fin<A> Run <RT, A> (this K<Eff<RT>, A> ma, RT env, EnvIO envIO) Source #

Invoke the effect

Returns the result value only

method A RunUnsafe <RT, A> (this K<Eff<RT>, A> ma, 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, A> (this K<Eff<RT>, A> ma, 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, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect to leave the inner IO monad

method Task<Fin<A>> RunAsync <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

Returns the result value only

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

Invoke the effect

Returns the result value only

method ValueTask<A> RunUnsafeAsync <RT, A> (this K<Eff<RT>, A> ma, 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, A> (this K<Eff<RT>, A> ma, 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 Eff<RT, A> Flatten <RT, A> (this K<Eff<RT>, Eff<RT, A>> mma) Source #

Monadic join operator

Collapses a nested IO monad so there is no nesting.

Parameters

type RT

Runtime

type A

Bound value

param mma

Nest IO monad to flatten

returns

Flattened IO monad

method Eff<RT, A> Flatten <RT, A> (this K<Eff<RT>, K<Eff<RT>, A>> mma) Source #

Monadic join operator

Collapses a nested IO monad so there is no nesting.

Parameters

type RT

Runtime

type A

Bound value

param mma

Nest IO monad to flatten

returns

Flattened IO monad

method Eff<RT, D> SelectMany <RT, A, B, C, D> ( this (K<Eff<RT>, A> First, K<Eff<RT>, B> Second) self, Func<(A First, B Second), K<Eff<RT>, C>> bind, Func<(A First, B Second), C, D> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, D> SelectMany <RT, A, B, C, D> ( this K<Eff<RT>, A> self, Func<A, (K<Eff<RT>, B> First, K<Eff<RT>, C> Second)> bind, Func<A, (B First, C Second), D> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, E> SelectMany <RT, A, B, C, D, E> ( this (K<Eff<RT>, A> First, K<Eff<RT>, B> Second, K<Eff<RT>, C> Third) self, Func<(A First, B Second, C Third), K<Eff<RT>, D>> bind, Func<(A First, B Second, C Third), D, E> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, E> SelectMany <RT, A, B, C, D, E> ( this K<Eff<RT>, A> self, Func<A, (K<Eff<RT>, B> First, K<Eff<RT>, C> Second, K<Eff<RT>, D> Third)> bind, Func<A, (B First, C Second, D Third), E> project) Source #

Monadic bind and project with paired IO monads