code: func cleanClass(rp *[]rune) []rune {
  
  	// Sort by lo increasing, hi decreasing to break ties.
  	sort.Sort(ranges{rp})
  
  	r := *rp
  	if len(r) < 2 {
  		return r
  	}
  
  	// Merge abutting, overlapping.
  	w := 2 // write index
  	for i := 2; i < len(r); i += 2 {
  		lo, hi := r[i], r[i+1]
  		if lo <= r[w-1]+1 {
  			// merge with previous range
  			if hi > r[w-1] {
  				r[w-1] = hi
  			}
  			continue
  		}
  		// new disjoint range
  		r[w] = lo
  		r[w+1] = hi
  		w += 2
  	}
  
  	return r[:w]
  }
docs: // cleanClass sorts the ranges (pairs of elements of r),
  // merges them, and eliminates duplicates.