LanguageExt.Core

LanguageExt.Core Monads Alternative Monads These

Contents

Sub modules

Extensions
Operators
Prelude
Trait

record These <A, B> Source #

record Both (A First, B Second) Source #

Methods

method C Match <C> (Func<A, C> This, Func<B, C> That, Func<A, B, C> Both) Source #

method (A, B) ToTuple (A x, B y) Source #

method These<A, C> Map <C> (Func<B, C> f) Source #

method These<C, D> BiMap <C, D> (Func<A, C> This, Func<B, D> That) Source #

record These <A, B> Source #

Methods

method C Match <C> (Func<A, C> This, Func<B, C> That, Func<A, B, C> Both) Source #

Case analysis for the These type

Parameters

type C

Result type

param This

Match for This state

param That

Match for That state

param Both

Match for Both state

returns

Result of running either This, That, or Both

method (A, B) ToTuple (A x, B y) Source #

Takes two default values and produces a tuple

Parameters

param x

Default value A

param y

Default value B

returns

Tuple

method These<C, D> BiMap <C, D> (Func<A, C> This, Func<B, D> That) Source #

where C : Semigroup<C>

Bi-functor map operation

Parameters

type C

Resulting This bound value type

type D

Resulting That bound value type

param This

Mapping of This

param That

Mapping of That

returns

method These<A, C> Map <C> (Func<B, C> f) Source #

Functor map operation

Parameters

param f

Mapping function

method K<F, These<A, C>> Traverse <F, C> (Func<B, K<F, C>> f) Source #

where F : Applicative<F>

Traverse

method C Merge <C> (Func<A, C> This, Func<B, C> That, Func<C, C, C> Both) Source #

where C : Semigroup<C>

Bi-map and coalesce results with the provided operation.

Parameters

type C
param This

This mapping

param That

That mapping

param Both

Both mapping

returns

class These Source #

Methods

method These<A, B> This <A, B> (A value) Source #

This constructor

Parameters

param value

Value to set

returns

Constructed These structure

method These<A, B> That <A, B> (B value) Source #

That constructor

Parameters

param value

Value to set

returns

Constructed These structure

method These<A, B> Both <A, B> (A first, B second) Source #

Both constructor

Parameters

param first

First value to set

param second

Second value to set

returns

Constructed These structure

method A merge <A> (Func<A, A, A> f, These<A, A> these) Source #

Coalesce with the provided operation

Parameters

param f

Coalesce operation

returns

Coalesced value

method (Seq<A> This, Seq<B> That, Seq<(A, B)> Both) partition <F, A, B> ( K<F, These<A, B>> theses) Source #

where F : Foldable<F>

Select each constructor and partition them into separate lists.

Parameters

type F

Foldable structure

param theses

Selection

returns

Partitioned sequences

method (Seq<A> This, Seq<B> That) partition2 <F, A, B> ( K<F, These<A, B>> theses) Source #

where F : Foldable<F>

Select each constructor and partition them into separate lists.

Parameters

type F

Foldable structure

param theses

Selection

returns

Partitioned sequences

record These <A, B> Source #

record That (B Value) Source #

Methods

method C Match <C> (Func<A, C> This, Func<B, C> That, Func<A, B, C> Both) Source #

method (A, B) ToTuple (A x, B y) Source #

method These<A, C> Map <C> (Func<B, C> f) Source #

method These<C, D> BiMap <C, D> (Func<A, C> This, Func<B, D> That) Source #

record These <A, B> Source #

record This (A Value) Source #

Methods

method C Match <C> (Func<A, C> This, Func<B, C> That, Func<A, B, C> Both) Source #

method (A, B) ToTuple (A x, B y) Source #

method These<A, C> Map <C> (Func<B, C> f) Source #

method These<C, D> BiMap <C, D> (Func<A, C> This, Func<B, D> That) Source #