Overview
Adapted from https://github.com/parsonsmatt/purescript-pair
Table of contents
- URI (type alias)
- Pair (class)
- URI (constant)
- pair (constant)
- getMonoid (function)
- getOrd (function)
- getSemigroup (function)
- getSetoid (function)
URI (type alias)
Signature
export type URI = typeof URI
Pair (class)
Signature
export class Pair<A> {
constructor(readonly fst: A, readonly snd: A) { ... }
...
}
Added in v1.0.0
first (method)
Map a function over the first field of a pair
Signature
first(f: Endomorphism<A>): Pair<A> { ... }
second (method)
Map a function over the second field of a pair
Signature
second(f: Endomorphism<A>): Pair<A> { ... }
swap (method)
Swaps the elements in a pair
Signature
swap(): Pair<A> { ... }
map (method)
Signature
map<B>(f: (a: A) => B): Pair<B> { ... }
ap (method)
Signature
ap<B>(fab: Pair<(a: A) => B>): Pair<B> { ... }
ap_ (method)
Flipped version of ap
Signature
ap_<B, C>(this: Pair<(b: B) => C>, fb: Pair<B>): Pair<C> { ... }
reduce (method)
Signature
reduce<B>(b: B, f: (b: B, a: A) => B): B { ... }
extract (method)
Signature
extract(): A { ... }
extend (method)
Signature
extend<B>(f: (fb: Pair<A>) => B): Pair<B> { ... }
URI (constant)
Signature
export const URI = ...
pair (constant)
Signature
export const pair: Applicative1<URI> & Foldable2v1<URI> & Traversable2v1<URI> & Comonad1<URI> = ...
Added in v1.0.0
getMonoid (function)
Signature
export const getMonoid = <A>(M: Monoid<A>): Monoid<Pair<A>> => ...
Added in v1.0.0
getOrd (function)
Signature
export const getOrd = <A>(O: Ord<A>): Ord<Pair<A>> => ...
Added in v1.0.0
getSemigroup (function)
Signature
export const getSemigroup = <A>(S: Semigroup<A>): Semigroup<Pair<A>> => ...
Added in v1.0.0
getSetoid (function)
Signature
export const getSetoid = <A>(S: Setoid<A>): Setoid<Pair<A>> => ...
Added in v1.0.0