collections.js
function Sequence(iterable) {
    this.sequence = null;
    this._size = 0;
    this.nodeMap = new rMap();
    if (iterable) {
      if (typeof iterable.length === 'number') {
        for (var i = 0; i < iterable.length; i++) {
          this.add.apply(this, iterable[i]);
        }
      } else if (typeof iterable.entries === 'function') {
        var it = iterable.entries();
        while (!it.done) {
          var tmp = it.next();
          this.add.apply(this, tmp);//it.next());
        }
      }
    }
  }
function Sequence(iterable) {
    this.sequence = null;
    this._size = 0;
    this.nodeMap = new rMap();
    if (iterable) {
      if (typeof iterable.length === 'number') {
        for (var i = 0; i < iterable.length; i++) {
          this.add.apply(this, iterable[i]);
        }
      } else if (typeof iterable.entries === 'function') {
        var it = iterable.entries();
        while (!it.done) {
          var tmp = it.next();
          this.add.apply(this, tmp);//it.next());
        }
      }
    }
  }
function Sequence ( iterable ) { this . sequence = null ; this . _size = 0 ; this . nodeMap = new rMap ( ) ; if ( iterable ) { if ( typeof iterable . length === 'number' ) { for ( var i = 0 ; i < iterable . length ; i ++ ) { this . add . apply ( this , iterable [ i ] ) ; } } else if ( typeof iterable . entries === 'function' ) { var it = iterable . entries ( ) ; while ( ! it . done ) { var tmp = it . next ( ) ; this . add . apply ( this , tmp ) ; //it.next()); } } } }
A Sequence is a doubly linked list where the conses are also stored in a Map and accessible by a key.
A Sequence is a doubly linked list where the conses are also stored in a Map and accessible by a key .