← Back

Source

pair

Applicative1<URI> & Foldable2v1<URI> & Traversable2v1<URI> & Comonad1<URI>

Added in v1.0.0 (instance)

Pair

constructor(readonly fst: A, readonly snd: A) {}

Added in v1.0.0 (data)

ap

<B>(fab: Pair<(a: A) => B>): Pair<B>

Added in v1.0.0 (method)

ap_

<B, C>(this: Pair<(b: B) => C>, fb: Pair<B>): Pair<C>

Added in v1.0.0 (method)

Flipped version of ap

extend

<B>(f: (fb: Pair<A>) => B): Pair<B>

Added in v1.0.0 (method)

extract

(): A

Added in v1.0.0 (method)

first

(f: Endomorphism<A>): Pair<A>

Added in v1.0.0 (method)

Map a function over the first field of a pair

map

<B>(f: (a: A) => B): Pair<B>

Added in v1.0.0 (method)

reduce

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

Added in v1.0.0 (method)

second

(f: Endomorphism<A>): Pair<A>

Added in v1.0.0 (method)

Map a function over the second field of a pair

swap

(): Pair<A>

Added in v1.0.0 (method)

Swaps the elements in a pair

getMonoid

<A>(M: Monoid<A>): Monoid<Pair<A>>

Added in v1.0.0 (function)

getOrd

<A>(O: Ord<A>): Ord<Pair<A>>

Added in v1.0.0 (function)

getSemigroup

<A>(S: Semigroup<A>): Semigroup<Pair<A>>

Added in v1.0.0 (function)

getSetoid

<A>(S: Setoid<A>): Setoid<Pair<A>>

Added in v1.0.0 (function)