code: func deindent(lines []string) []string {
  	const inf = 9999999
  
  	// First pass: get rid of whitespace-only lines, find the smallest indentation
  	// level (in number of whitespace runes) among non-empty lines.
  	numRunesToSkip := inf
  	for idx, l := range lines {
  		spaceRunes := countLeadingSpace(l)
  		if spaceRunes == utf8.RuneCountInString(l) {
  			lines[idx] = "" // clear completely whitespace lines
  		} else if spaceRunes < numRunesToSkip {
  			numRunesToSkip = spaceRunes
  		}
  	}
  
  	// No lines at all, or only empty lines, or nothing to deindent.
  	if numRunesToSkip == inf || numRunesToSkip == 0 {
  		return lines
  	}
  
  	bytesToSkip := func(s string) int {
  		idx := 0
  		for pos := range s {
  			if idx == numRunesToSkip {
  				return pos
  			}
  			idx++
  		}
  		panic("unreachable")
  	}
  
  	// Cut the indentation by skipping 'numRunesToSkip' number of runes in each
  	// non-empty line.
  	for idx, l := range lines {
  		if l != "" {
  			lines[idx] = l[bytesToSkip(l):]
  		}
  	}
  	return lines
  }
docs: // deindent removes common indentation from the lines.
  //
  // Mutates the slice in-place and returns it.
  //
  // Whitespace only lines are replaced by completely empty lines. All whitespace
  // characters are treated equally as 1 indentation level, so mixed spaces and
  // tabs will result in a weird output (but using ether spaces or either tabs
  // alone is fine).