whole_func_string: function heapify(compare, x) {
  
    var n = x.length;
  
    for (var k = n / 2 | 0; k;) {
  
      (0, _core.siftdown)(compare, x, 0, n, --k);
    }
  
    return new _core.Heap(compare, x);
  }
func_code_string: function heapify(compare, x) {
  
    var n = x.length;
  
    for (var k = n / 2 | 0; k;) {
  
      (0, _core.siftdown)(compare, x, 0, n, --k);
    }
  
    return new _core.Heap(compare, x);
  }
func_documentation_string: Builds a heap in O(n) operations.
  
  @param {function} compare the comparison function
  @param {array} x the array where the heap is stored