lib/stack.structures.js
function(elem){
             if(!this.root){
              this.root = struct.Node(elem);
              this.tail = this.root;
              this.size = 1;
              return this;
              // this.root.isRoot = true;
             }
            this.root.prepend(elem);
            this.root = this.root.previous;
            this.size += 1;
            // this.add(elem,this.root);
            return this;
          }
function(elem){
             if(!this.root){
              this.root = struct.Node(elem);
              this.tail = this.root;
              this.size = 1;
              return this;
              // this.root.isRoot = true;
             }
            this.root.prepend(elem);
            this.root = this.root.previous;
            this.size += 1;
            // this.add(elem,this.root);
            return this;
          }
function ( elem ) { if ( ! this . root ) { this . root = struct . Node ( elem ) ; this . tail = this . root ; this . size = 1 ; return this ; // this.root.isRoot = true; } this . root . prepend ( elem ) ; this . root = this . root . previous ; this . size += 1 ; // this.add(elem,this.root); return this ; }
adds from the back of the tail element
adds from the back of the tail element