code: func makeSelection(matches [][]int) Selection {
  	return func() (seg []int) {
  		if len(matches) > 0 {
  			seg = matches[0]
  			matches = matches[1:]
  		}
  		return
  	}
  }
docs: // makeSelection is a helper function to make a Selection from a slice of pairs.