Tuple overview

Added in v2.0.0


Table of contents


Bifunctor

bimap

Map a pair of functions over the two type arguments of the bifunctor.

Signature

export declare const bimap: <E, G, A, B>(f: (e: E) => G, g: (a: A) => B) => (fa: [A, E]) => [B, G]

Added in v2.0.0

mapLeft

Map a function over the first type argument of a bifunctor.

Signature

export declare const mapLeft: <E, G>(f: (e: E) => G) => <A>(fa: [A, E]) => [A, G]

Added in v2.0.0

Extend

duplicate

Signature

export declare const duplicate: <E, A>(ma: [A, E]) => [[A, E], E]

Added in v2.0.0

extend

Signature

export declare const extend: <E, A, B>(f: (wa: [A, E]) => B) => (wa: [A, E]) => [B, E]

Added in v2.0.0

Extract

extract

Signature

export declare const extract: <E, A>(wa: [A, E]) => A

Added in v2.6.2

Foldable

foldMap

Signature

export declare const foldMap: <M>(M: Monoid<M>) => <A>(f: (a: A) => M) => <E>(fa: [A, E]) => M

Added in v2.0.0

reduce

Signature

export declare const reduce: <A, B>(b: B, f: (b: B, a: A) => B) => <E>(fa: [A, E]) => B

Added in v2.0.0

reduceRight

Signature

export declare const reduceRight: <A, B>(b: B, f: (a: A, b: B) => B) => <E>(fa: [A, E]) => B

Added in v2.0.0

Functor

map

map can be used to turn functions (a: A) => B into functions (fa: F<A>) => F<B> whose argument and return types use the type constructor F to represent some computational context.

Signature

export declare const map: <A, B>(f: (a: A) => B) => <E>(fa: [A, E]) => [B, E]

Added in v2.0.0

Semigroupoid

compose

Signature

export declare const compose: <E, A>(la: [A, E]) => <B>(ab: [B, A]) => [B, E]

Added in v2.0.0

combinators

swap

Signature

export declare const swap: <A, S>(sa: [A, S]) => [S, A]

Added in v2.0.0

destructors

fst

Signature

export declare const fst: <A, S>(sa: [A, S]) => A

Added in v2.0.0

snd

Signature

export declare const snd: <A, S>(sa: [A, S]) => S

Added in v2.0.0

instances

URI

Signature

export declare const URI: 'Tuple'

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

bifunctorTuple

Signature

export declare const bifunctorTuple: Bifunctor2<'Tuple'>

Added in v2.7.0

comonadTuple

Signature

export declare const comonadTuple: Comonad2<'Tuple'>

Added in v2.7.0

foldableTuple

Signature

export declare const foldableTuple: Foldable2<'Tuple'>

Added in v2.7.0

functorTuple

Signature

export declare const functorTuple: Functor2<'Tuple'>

Added in v2.7.0

getApplicative

Signature

export declare const getApplicative: <S>(M: Monoid<S>) => Applicative2C<'Tuple', S>

Added in v2.0.0

getApply

Signature

export declare const getApply: <S>(S: Semigroup<S>) => Apply2C<'Tuple', S>

Added in v2.0.0

getChain

Signature

export declare const getChain: <S>(S: Semigroup<S>) => Chain2C<'Tuple', S>

Added in v2.0.0

getChainRec

Signature

export declare const getChainRec: <S>(M: Monoid<S>) => ChainRec2C<'Tuple', S>

Added in v2.0.0

getMonad

Signature

export declare const getMonad: <S>(M: Monoid<S>) => Monad2C<'Tuple', S>

Added in v2.0.0

semigroupoidTuple

Signature

export declare const semigroupoidTuple: Semigroupoid2<'Tuple'>

Added in v2.7.0

traversableTuple

Signature

export declare const traversableTuple: Traversable2<'Tuple'>

Added in v2.7.0

tuple

Signature

export declare const tuple: Semigroupoid2<'Tuple'> &
  Bifunctor2<'Tuple'> &
  Comonad2<'Tuple'> &
  Foldable2<'Tuple'> &
  Traversable2<'Tuple'>

Added in v2.0.0

utils

sequence

Signature

export declare const sequence: Sequence2<'Tuple'>

Added in v2.6.3

traverse

Signature

export declare const traverse: PipeableTraverse2<'Tuple'>

Added in v2.6.3