LanguageExt.Core

LanguageExt.Core Traits Decidable

Contents

class Decidable Source #

A Divisible contravariant functor is the contravariant analogue of Applicative.

Continuing the intuition that 'Contravariant' functors (Cofunctor) consume input, a 'Divisible' contravariant functor also has the ability to be composed "beside" another contravariant functor.

Parameters

type F

Self referring type

Methods

method K<F, A> lose <F, A> (Func<A, Void> f) Source #

where F : Decidable<F>

Acts as identity to 'Choose'.

method K<F, Void> lost <F> () Source #

where F : Decidable<F>

Acts as identity to 'Choose'.

lost = lose(identity)

method K<F, A> route <F, A, B, C> (Func<A, Either<B, C>> f, K<F, B> fb, K<F, C> fc) Source #

where F : Decidable<F>

Fan out the input

method K<F, Either<A, B>> route <F, A, B> (K<F, A> fa, K<F, B> fb) Source #

where F : Decidable<F>

Fan out the input

route(fb, fc) = route(id, fb, fc)

class Prelude Source #

A Divisible contravariant functor is the contravariant analogue of Applicative.

Continuing the intuition that 'Contravariant' functors (Cofunctor) consume input, a 'Divisible' contravariant functor also has the ability to be composed "beside" another contravariant functor.

Parameters

type F

Self referring type

interface Decidable <F> Source #

A Decidable contravariant functor is the contravariant analogue of Alternative.

Noting the superclass constraint that f must also be Divisible, a Decidable functor has the ability to "fan out" input, under the intuition that contravariant functors consume input.

Parameters

type F

Self referring type

Methods

method K<F, A> Lose <A> (Func<A, Void> f) Source #

Acts as identity to 'Choose'.

method K<F, A> Route <A, B, C> (Func<A, Either<B, C>> f, K<F, B> fb, K<F, C> fc) Source #

Fan out the input