code: func appendFoldedRange(r []rune, lo, hi rune) []rune {
  	// Optimizations.
  	if lo <= minFold && hi >= maxFold {
  		// Range is full: folding can't add more.
  		return appendRange(r, lo, hi)
  	}
  	if hi < minFold || lo > maxFold {
  		// Range is outside folding possibilities.
  		return appendRange(r, lo, hi)
  	}
  	if lo < minFold {
  		// [lo, minFold-1] needs no folding.
  		r = appendRange(r, lo, minFold-1)
  		lo = minFold
  	}
  	if hi > maxFold {
  		// [maxFold+1, hi] needs no folding.
  		r = appendRange(r, maxFold+1, hi)
  		hi = maxFold
  	}
  
  	// Brute force.  Depend on appendRange to coalesce ranges on the fly.
  	for c := lo; c <= hi; c++ {
  		r = appendRange(r, c, c)
  		f := unicode.SimpleFold(c)
  		for f != c {
  			r = appendRange(r, f, f)
  			f = unicode.SimpleFold(f)
  		}
  	}
  	return r
  }
docs: // appendFoldedRange returns the result of appending the range lo-hi
  // and its case folding-equivalent runes to the class r.