func (h *RefByHeight) DropIndices(indices []int) {
	sort.Ints(indices)
	old := *h
	numIdx := len(indices)
	for i, j := 0, 0; i < old.Len(); i++ {
		if len(indices) > 0 && i == indices[0] {
			indices = indices[1:]
			continue
		}
		if i != j {
			old[j] = old[i]
		}
		j++
	}
	*h = old[:old.Len()-numIdx]
}
DropIndices takes a slice of integer indices into h and splices out the Refs at those indices.
package types
import (
	"sort"
	"github.com/attic-labs/noms/go/hash"
)
type RefByHeight []Ref
func (h RefByHeight) Len() int {
	return len(h)
}
func (h RefByHeight) Less(i, j int) bool {
	return !HeightOrder(h[i], h[j])
}
func (h RefByHeight) Swap(i, j int) {
	h[i], h[j] = h[j], h[i]
}
func (h *RefByHeight) PushBack(r Ref) {
	*h = append(*h, r)
}
func (h *RefByHeight) PopBack() Ref {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}