LanguageExt.Core

LanguageExt.Core Monads Alternative Monads Try Extensions

Contents

class TryExtensions Source #

Try monad extensions

Methods

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

method Fin<A> Run <A> (this K<Try, A> ma) Source #

Run the Try

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

Monadic join

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

Monadic join

class TryExtensions Source #

Methods

method Try<B> Map <A, B> (this Func<A, B> f, K<Try, 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 Try<B> Map <A, B> (this Func<A, B> f, Try<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 Try<B> Action <A, B> (this Try<A> ma, K<Try, B> mb) Source #

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

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

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

method Try<B> Apply <A, B> (this Try<Func<A, B>> mf, K<Try, 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 Try<B> Apply <A, B> (this K<Try, Func<A, B>> mf, K<Try, 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