code: func (kcp *KCP) remove_front(q []segment, n int) []segment {
  	if n > len(q)/2 {
  		newn := copy(q, q[n:])
  		return q[:newn]
  	}
  	return q[n:]
  }
docs: // remove front n elements from queue
  // if the number of elements to remove is more than half of the size.
  // just shift the rear elements to front, otherwise just reslice q to q[n:]
  // then the cost of runtime.growslice can always be less than n/2