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

Static variables

staticread onlyleft:T0

Alias for _0.

staticread onlyright:T1

Alias for _1.

Static methods

@:fromstaticinlinearrayToTuple2<T>(v:Array<T>):Tuple2<T, T>

staticinlinedropLeft(this:{_1:T1, _0:T0}):Tuple1<T1>

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

staticinlinedropRight(this:{_1:T1, _0:T0}):Tuple1<T0>

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

staticinlineflip(this:{_1:T1, _0:T0}):Tuple2<T1, T0>

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

staticmap<T2>(this:{_1:T1, _0:T0}, f:T1 ‑> T2):Tuple2<T0, T2>

staticinlineof<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

staticinlinetoString(this:{_1:T1, _0:T0}):String

Provides a string representation of the Tuple

staticinlinewith<T2>(this:{_1:T1, _0:T0}, 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.