code: function(a, b) {
          var self = this;
  
          function compareArrays(a, b) {
              if (a.length !== b.length) {
                  return a.length < b.length ? -1 : 1;
              } else {
                  for (var i = 0; i < a.length ; i++) {
                      var compareResult = self.compare(a[i], b[i]);
                      if (compareResult !== 0) {
                          return compareResult;
                      }
                  }
                  return 0;
              }
          }
  
          var typeA = this.typeOf(a);
          var typeB = this.typeOf(b);
  
          if (typeA !== typeB) {
              throw typeErrorIncomparable(a, b);
          }
  
          switch (typeA) {
              case 'Number':
              case 'String':
                  return a === b ? 0 : (a > b ? 1 : -1);
  
              case 'Date':
              case 'Duration':
                  return JuttleMoment.compare(a, b);
  
              case 'Array':
                  return compareArrays(a, b);
  
              default:
                  throw typeErrorIncomparable(a, b);
          }
  
      }
docs: Compares two Juttle values. For values a and b, returns -1 if a < b, 0 if a = b, 1 if a > b