UNPKG

standard-data-structures

Version:

A collection of standard data-structures for node and browser

25 lines (24 loc) 633 B
/** * A tuple data-structure that can carry two values viz _0 and _1. */ export declare class Tuple<A0, A1> { readonly _0: A0; readonly _1: A1; /** * Creates a new instance of [[Tuple]] */ static of<A0, A1>(_0: A0, _1: A1): Tuple<A0, A1>; private constructor(); /** * Maps over both the first and the second value. */ biMap<B0, B1>(LL: (L: A0) => B0, RR: (R: A1) => B1): Tuple<B0, B1>; /** * Maps over the zeroth value */ map0<LL>(_0: (R: A0) => LL): Tuple<LL, A1>; /** * Maps over the first value */ map1<RR>(RR: (R: A1) => RR): Tuple<A0, RR>; }