LanguageExt.Core

LanguageExt.Core Monads Alternative Monads Validation Prelude

Contents

class Prelude Source #

Methods

method Validation<F, B> action <F, A, B> (K<Validation<F>, A> ma, K<Validation<F>, B> mb) Source #

where F : Semigroup<F>

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

method Validation<F, B> apply <F, A, B> (K<Validation<F>, Func<A, B>> mf, K<Validation<F>, A> ma) Source #

where F : Semigroup<F>

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 Prelude Source #

Methods

method Validation<F, A> Success <F, A> (A value) Source #

where F : Monoid<F>

Represents a successful operation

Parameters

type F

Error type

type A

Value type

param value

Value

returns

Validation applicative

method Validation<F, A> Fail <F, A> (F value) Source #

where F : Monoid<F>

Represents a failed operation

Parameters

type F

Error type

type A

Value type

param value

Error value

returns

Validation applicative

method Validation<F, A> Fail <F, A> (Seq<F> values) Source #

where F : Monoid<F>

Represents a failed operation

Parameters

type F

Error type

type A

Value type

param value

Error value

returns

Validation applicative

class Prelude Source #

Methods

method Validation<F, B> map <F, A, B> (Func<A, B> f, K<Validation<F>, 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