code: function(fun) {
        return function(x, y) {
          if (truthy(fun(x, y)))
            return -1;
          else if (truthy(fun(y, x)))
            return 1;
          else
            return 0;
        };
      }
docs: Takes a predicate-like and returns a comparator (-1,0,1).