Tuple

Tuple is a tagged fixed length array - just like normal script array but with the tag.

Tuples are created by either using tuple literals:

var vnode = [div: {id="foo"}, ["content"]];

Or by explicit constructor call:

var vnode = new Tuple(#div, [{id="foo"}, ["content"]]);

Or by SSX expression (it will create tuple of exactly same structure as the above):

var vnode = <div id="foo">content</div>;

Constants

N/A

Properties

[index]
- integer, element of the tuple at the index position, read-write index accessor. Zero-based integer index.
length
- integer, read-only, number of elements in the tuple.
tag
- symbol, is a tag (or name) of the tuple. 

Methods

this
( tag: symbol | string, length: integer  )
( tag: symbol | string, elements: array )

Constructs tuple having the tag, an the length number of initially undefined elements. Or tuple with the tag and elements of the array.

clone
( ) returns : tuple

returns shallow copy of the tuple.