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.add(elem);
            this.tail.append(elem);
            this.tail = this.tail.next;
            this.size += 1;
            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.add(elem);
            this.tail.append(elem);
            this.tail = this.tail.next;
            this.size += 1;
            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.add(elem); this . tail . append ( elem ) ; this . tail = this . tail . next ; this . size += 1 ; return this ; }
adds in front of the tail element
adds in front of the tail element