Overview
Adapted from https://github.com/purescript/purescript-tuples
Table of contents
- URI (type alias)
- Tuple (class)
- URI (constant)
- tuple (constant)
- getApplicative (function)
- getApply (function)
- getChain (function)
- getChainRec (function)
- getMonad (function)
- getMonoid (function)
- getOrd (function)
- getSemigroup (function)
- getSetoid (function)
URI (type alias)
Signature
export type URI = typeof URI
Tuple (class)
Signature
export class Tuple<L, A> {
constructor(readonly fst: L, readonly snd: A) { ... }
...
}
Added in v1.0.0
compose (method)
Signature
compose<B>(ab: Tuple<A, B>): Tuple<L, B> { ... }
map (method)
Signature
map<B>(f: (a: A) => B): Tuple<L, B> { ... }
bimap (method)
Signature
bimap<M, B>(f: (l: L) => M, g: (a: A) => B): Tuple<M, B> { ... }
extract (method)
Signature
extract(): A { ... }
extend (method)
Signature
extend<B>(f: (fa: Tuple<L, A>) => B): Tuple<L, B> { ... }
reduce (method)
Signature
reduce<B>(b: B, f: (b: B, a: A) => B): B { ... }
swap (method)
Exchange the first and second components of a tuple
Signature
swap(): Tuple<A, L> { ... }
inspect (method)
Signature
inspect(): string { ... }
toString (method)
Signature
toString(): string { ... }
toTuple (method)
Signature
toTuple(): [L, A] { ... }
URI (constant)
Signature
export const URI = ...
tuple (constant)
Signature
export const tuple: Semigroupoid2<URI> & Bifunctor2<URI> & Comonad2<URI> & Foldable2v2<URI> & Traversable2v2<URI> = ...
Added in v1.0.0
getApplicative (function)
Signature
export const getApplicative = <L>(M: Monoid<L>): Applicative2C<URI, L> => ...
Added in v1.0.0
getApply (function)
Signature
export const getApply = <L>(S: Semigroup<L>): Apply2C<URI, L> => ...
Added in v1.0.0
getChain (function)
Signature
export const getChain = <L>(S: Semigroup<L>): Chain2C<URI, L> => ...
Added in v1.0.0
getChainRec (function)
Signature
export const getChainRec = <L>(M: Monoid<L>): ChainRec2C<URI, L> => ...
Added in v1.0.0
getMonad (function)
Signature
export const getMonad = <L>(M: Monoid<L>): Monad2C<URI, L> => ...
Added in v1.0.0
getMonoid (function)
Signature
export const getMonoid = <L, A>(ML: Monoid<L>, MA: Monoid<A>): Monoid<Tuple<L, A>> => ...
Added in v1.0.0
getOrd (function)
To obtain the result, the fst
s are compare
d, and if they are EQ
ual, the
snd
s are compare
d.
Signature
export const getOrd = <L, A>(OL: Ord<L>, OA: Ord<A>): Ord<Tuple<L, A>> => ...
Added in v1.0.0
getSemigroup (function)
Signature
export const getSemigroup = <L, A>(SL: Semigroup<L>, SA: Semigroup<A>): Semigroup<Tuple<L, A>> => ...
Added in v1.0.0
getSetoid (function)
Signature
export const getSetoid = <L, A>(SA: Setoid<L>, SB: Setoid<A>): Setoid<Tuple<L, A>> => ...
Added in v1.0.0