Class: Tlist

Tlist(…items) → {Array}

Tlist

Constructor

new Tlist(…items) → {Array}

constructor

Parameters:
Name Type Attributes Description
items Object | Array <repeatable>
even_length_array or dict_object or tuple_array
Source:
Returns:
tlist - tuple list
Type
Array
Example
term

    //prototype
    var tl0 = new Tlist([ 0, 'a' ], [ 1, 'b' ],[2, 'c'], [ 0, 'a' ], [ 1, 'b' ],[2,'c'])
    tl0
    var tl1 = new Tlist(0,'a',1,'b',2,'c',0,'a',1,'b',2,'c')
    tl1
    var tl2 = new Tlist({
        0:'a',
        1:'b',
        2:'c'
    })
    tl2
    ////
    > var tl0 = new Tlist([ 0, 'a' ], [ 1, 'b' ],[2, 'c'], [ 0, 'a' ], [ 1, 'b' ],[2,'c'])
    undefined
    > tl0
    Tlist [
      [ 0, 'a' ],
      [ 1, 'b' ],
      [ 2, 'c' ],
      [ 0, 'a' ],
      [ 1, 'b' ],
      [ 2, 'c' ] ]
    > var tl1 = new Tlist(0,'a',1,'b',2,'c',0,'a',1,'b',2,'c')
    undefined
    > tl1
    Tlist [
      [ 0, 'a' ],
      [ 1, 'b' ],
      [ 2, 'c' ],
      [ 0, 'a' ],
      [ 1, 'b' ],
      [ 2, 'c' ] ]
    > var tl2 = new Tlist({
    ...     0:'a',
    ...     1:'b',
    ...     2:'c'
    ... })
    undefined
    > tl2
    Tlist [ [ '0', 'a' ], [ '1', 'b' ], [ '2', 'c' ] ]
    >

    //function

   ////