func (r SortedIntToStringMap) Has(k int) bool {
	_, ok := r.loopGet(r.root, k)
	return ok
}
Has tells if a value exists at key `k`. This is short hand for `Get.
package codegen
func (r SortedIntToStringMap) compare(a, b int) int { return int(a) - int(b) }
type SortedIntToStringMap struct {
	root *nodeIntToString
}
func NewSortedIntToStringMap() *SortedIntToStringMap { return &SortedIntToStringMap{} }
func (r SortedIntToStringMap) IsEmpty() bool {
	return r.root == nil
}
func (r SortedIntToStringMap) Size() int { return r.root.size() }
func (r *SortedIntToStringMap) Clear() { r.root = nil }
func (r *SortedIntToStringMap) Put(k int, v string) (old string, overwrite bool) {
	r.root, old, overwrite = r.put(r.root, k, func() string { return v }, func(_ string) string { return v })
	return
}
func (r *SortedIntToStringMap) Mutate(k int, creator func() string, mutator func(old string) string) {
	r.root, _, _ = r.put(r.root, k, creator, mutator)
}
func (r *SortedIntToStringMap) put(h *nodeIntToString, k int, create func() string, mutate func(old string) string) (_ *nodeIntToString, old string, overwrite bool) {
	if h == nil {
		n := &nodeIntToString{key: k, val: create(), n: 1, colorRed: true}
		return n, old, overwrite
	}
	cmp := r.compare(k, h.key)
	if cmp < 0 {
		h.left, old, overwrite = r.put(h.left, k, create, mutate)
	} else if cmp > 0 {
		h.right, old, overwrite = r.put(h.right, k, create, mutate)
	} else {
		overwrite = true
		old = h.val
		h.val = mutate(old)
	}
	if h.right.isRed() && !h.left.isRed() {
		h = r.rotateLeft(h)
	}
	if h.left.isRed() && h.left.left.isRed() {
		h = r.rotateRight(h)
	}
	if h.left.isRed() && h.right.isRed() {
		r.flipColors(h)
	}
	h.n = h.left.size() + h.right.size() + 1
	return h, old, overwrite
}
func (r SortedIntToStringMap) Get(k int) (string, bool) {
	return r.loopGet(r.root, k)
}
func (r SortedIntToStringMap) loopGet(h *nodeIntToString, k int) (v string, ok bool) {
	for h != nil {
		cmp := r.compare(k, h.key)
		if cmp == 0 {
			return h.val, true
		} else if cmp < 0 {
			h = h.left
		} else if cmp > 0 {
			h = h.right
		}
	}
	return
}