Tuple2 is a tuple with two values. It maps to an anonymous object with fields _0 and _1.

Constructor

inline new (_0:T0, _1:T1)

Constructs an instance of Tuple2 the 2 required value.

Variables

read onlyleft:T0

Alias for _0.

read onlyright:T1

Alias for _1.

Methods

inline dropLeft ():Tuple1<T1>

dropLeft returns a new Tuple with one less element by dropping the first on the left.

inline dropRight ():Tuple1<T0>

dropLeft returns a new Tuple with one less element by dropping the last on the right.

inline flip ():Tuple2<T1, T0>

flip returns a new Tuple with the values in reverse order.

map<T2> (f:T1 ‑> T2):Tuple2<T0, T2>

inline toString ():String

Provides a string representation of the Tuple

inline with<T2> (v:T2):Tuple3<T0, T1, T2>

Creates a new Tuple with the addition of the extra value v. The Tuple of course increase in size by one.

Static methods

staticinline arrayToTuple2<T> (v:Array<T>):Tuple2<T, T>

staticinline of<A, B> (_0:A, _1:B):Tuple2<A, B>

Constructs an instance of Tuple2 the 2 required value. This is required because Tuple2.new.bind(...) crashes the compiler.

staticsqueeze<T1, T2, R> (f:T1 ‑> T2 ‑> R):Tuple2<T1, T2> ‑> R