function _add(i, data, t, comparator, tree) {
    var node = new Node(i, data);

    if (t === null) {
      node.left = node.right = null;
      tree._size++;
      return node;
    }

    t = splay(i, t, comparator);
    var cmp = comparator(i, t.key);
    if (cmp === 0) return t;else {
      if (cmp < 0) {
        node.left = t.left;
        node.right = t;
        t.left = null;
      } else if (cmp > 0) {
        node.right = t.right;
        node.left = t;
        t.right = null;
      }

      tree._size++;
      return node;
    }
  }
/**
   * Insert i into the tree t, unless it's already there.
   * @param  {Key}        i
   * @param  {Value}      data
   * @param  {Comparator} comparator
   * @param  {Tree}       tree
   * @return {Node}       root
   */
Insert i into the tree t, unless it's already there.
Insert i into the tree t unless it ' s already there .
function _add(i, data, t, comparator, tree) {
    var node = new Node(i, data);
    if (t === null) {
      node.left = node.right = null;
      tree._size++;
      return node;
    }
    t = splay(i, t, comparator);
    var cmp = comparator(i, t.key);
    if (cmp === 0) return t;else {
      if (cmp < 0) {
        node.left = t.left;
        node.right = t;
        t.left = null;
      } else if (cmp > 0) {
        node.right = t.right;
        node.left = t;
        t.right = null;
      }
      tree._size++;
      return node;
    }
  }
function _add ( i , data , t , comparator , tree ) { var node = new Node ( i , data ) ; if ( t === null ) { node . left = node . right = null ; tree . _size ++ ; return node ; } t = splay ( i , t , comparator ) ; var cmp = comparator ( i , t . key ) ; if ( cmp === 0 ) return t ; else { if ( cmp < 0 ) { node . left = t . left ; node . right = t ; t . left = null ; } else if ( cmp > 0 ) { node . right = t . right ; node . left = t ; t . right = null ; } tree . _size ++ ; return node ; } }
Insert i into the tree t, unless it's already there.
Insert i into the tree t unless it ' s already there .