Skip to content

Latest commit

 

History

History
319 lines (185 loc) · 2.98 KB

These.md

File metadata and controls

319 lines (185 loc) · 2.98 KB
id title
These
Module These

Source

Data

These

data

since 1.0.0

Signature

type These<L, A> = This<L, A> | That<L, A> | Both<L, A>

Methods

bimap

method

since 1.0.0

Signature

<M, B>(f: (l: L) => M, g: (a: A) => B): These<M, B>

fold

method

since 1.0.0

Signature

<B>(this_: (l: L) => B, that: (a: A) => B, both: (l: L, a: A) => B): B

Description

Applies a function to each case in the data structure

inspect

method

since 1.0.0

Signature

(): string

isBoth

method

since 1.0.0

Signature

(): this is Both<L, A>

Description

Returns true if the these is Both, false otherwise

isThat

method

since 1.0.0

Signature

(): this is That<L, A>

Description

Returns true if the these is That, false otherwise

isThis

method

since 1.0.0

Signature

(): this is This<L, A>

Description

Returns true if the these is This, false otherwise

map

method

since 1.0.0

Signature

<B>(f: (a: A) => B): These<L, B>

reduce

method

since 1.0.0

Signature

<B>(b: B, f: (b: B, a: A) => B): B

toString

method

since 1.0.0

Signature

(): string

Instances

these

instance

since 1.0.0

Signature

Functor2<URI> & Bifunctor2<URI> & Foldable2<URI> & Traversable2<URI>

Functions

both

function

since 1.0.0

Signature

<L, A>(l: L, a: A): These<L, A>

fromThese

function

since 1.0.0

Signature

<L, A>(defaultThis: L, defaultThat: A) => (fa: These<L, A>): [L, A]

getMonad

function

since 1.0.0

Signature

<L>(S: Semigroup<L>): Monad2C<URI, L>

getSemigroup

function

since 1.0.0

Signature

<L, A>(SL: Semigroup<L>, SA: Semigroup<A>): Semigroup<These<L, A>>

getSetoid

function

since 1.0.0

Signature

<L, A>(SL: Setoid<L>, SA: Setoid<A>): Setoid<These<L, A>>

isBoth

function

since 1.0.0

Signature

<L, A>(fa: These<L, A>): fa is Both<L, A>

Description

Returns true if the these is an instance of Both, false otherwise

isThat

function

since 1.0.0

Signature

<L, A>(fa: These<L, A>): fa is That<L, A>

Description

Returns true if the these is an instance of That, false otherwise

isThis

function

since 1.0.0

Signature

<L, A>(fa: These<L, A>): fa is This<L, A>

Description

Returns true if the these is an instance of This, false otherwise

that

function

since 1.0.0 Alias of

Signature

of

theseLeft

function

since 1.0.0

Signature

<L, A>(fa: These<L, A>): Option<L>

theseRight

function

since 1.0.0

Signature

<L, A>(fa: These<L, A>): Option<A>

this_

function

since 1.0.0

Signature

<L, A>(l: L): These<L, A>