code: function _Utils_cmp(x, y, ord) {
      if (typeof x !== "object") {
        return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1;
      }
  
      /**/
      if (x instanceof String) {
        var a = x.valueOf();
        var b = y.valueOf();
        return a === b ? 0 : a < b ? -1 : 1;
      }
      //*/
  
      /**_UNUSED/
  	if (!x.$)
  	//*/
      /**/
      if (x.$[0] === "#") {
        //*/
        return (ord = _Utils_cmp(x.a, y.a))
          ? ord
          : (ord = _Utils_cmp(x.b, y.b))
            ? ord
            : _Utils_cmp(x.c, y.c);
      }
  
      // traverse conses until end of a list or a mismatch
      for (; x.b && y.b && !(ord = _Utils_cmp(x.a, y.a)); x = x.b, y = y.b) {} // WHILE_CONSES
      return ord || (x.b ? /*GT*/ 1 : y.b ? /*LT*/ -1 : /*EQ*/ 0);
    }
docs: Code in Generate/JavaScript.hs, Basics.js, and List.js depends on the particular integer values assigned to LT, EQ, and GT.