[Type] Tuple

Part of: mobl
Inherits from: mobl::Object

Represents tuple values, essentially lists of a fixed length.


A new Tuple can be created by using tuple syntax.


var t = ("name", "Zef");

Syntactic sugar

A tuple type, such as Tuple2<String, String> can also be represented as (String, String).


var t : Tuple2<String, String> = ("name", "Zef");
var t2 : (String, String) = ("name", "Zef");

Instance properties

For every item in the tuple there is a _<n> field defined. For instance, a Tuple2<String, Num> has a _1 : String and a _2 : Num field.

mobl/tuple.txt · Last modified: 2013/10/01 02:28 (external edit)