code: function(tail, initElem, w, coord, comp, prop) {
     if(tail.length + initElem.length == 1) {
       var l = (tail.length == 1)? tail : initElem;
       this.layoutLast(l, w, coord, prop);
       return;
     }
     if(tail.length >= 2 && initElem.length == 0) {
       initElem = [tail.shift()];
     }
     if(tail.length == 0) {
       if(initElem.length > 0) this.layoutRow(initElem, w, coord, prop);
       return;
     }
     var c = tail[0];
     if(comp(initElem, w) >= comp([c].concat(initElem), w)) {
       this.computeDim(tail.slice(1), initElem.concat([c]), w, coord, comp, prop);
     } else {
       var newCoords = this.layoutRow(initElem, w, coord, prop);
       this.computeDim(tail, [], newCoords.dim, newCoords, comp, prop);
     }
   }
docs: /*
  Method: computeDim
  
  Computes dimensions and positions of a group of nodes
  according to a custom layout row condition.
  
  Parameters:
  
  tail - An array of nodes.
  initElem - An array of nodes (containing the initial node to be laid).
  w - A fixed dimension where nodes will be layed out.
  coord - A coordinates object specifying width, height, left and top style properties.
  comp - A custom comparison function