// insert new Element at the beginning of a list for every item in the given slice
179841
func (list *List) ShiftAll(slice []string) *List {
	for _, s := range slice {
		list.Shift(s)
	}
	return list
}
686512
func (l *List) InsertAfter(v *Node, mark *Element) *Element {
	if mark.list != l {
		return nil
	}
	// see comment in List.Remove about initialization of l
	return l.insertValue(v, mark)
}
1173009
func (ss *SortedSlice) Insert(e Sortable) {
	switch {
	// Particular cases
	case len(ss.s) == 0, !ss.s[len(ss.s)-1].Less(&e):
		ss.s = append(ss.s, e)
	case len(ss.s) == 1 && ss.s[0].Less(&e):
		ss.s = append(ss.s, e)
		ss.s[1] = ss.s[0]
		ss.s[0] = e
	default:
		//log.Printf("want to insert v=%v into %v", e, ss.s)
		i := ss.searchLessThan(&e, 0, len(ss.s)-1)
		//log.Printf("insert v=%v @ i=%d in ss=%v", e, i, ss.s)
		// Avoid creating intermediary slices
		ss.s = append(ss.s, e)
		copy(ss.s[i+1:], ss.s[i:])
		ss.s[i] = e
	}
}
49460
func (l *ItemList) InsertBefore(v Item, mark *ItemElement) *ItemElement {
	if mark.list != l {
		return nil
	}
	// see comment in List.Remove about initialization of l
	return l.insertValue(v, mark.prev)
}
347544
func (c *COWList) Append(i interface{}) int {
	c.mu.Lock()
	defer c.mu.Unlock()
	list := c.v.Load().([]interface{})
	newLen := len(list) + 1
	newList := make([]interface{}, newLen)
	copy(newList, list)
	newList[newLen-1] = i
	c.v.Store(newList)
	return newLen - 1
}
1142597
func (trie *Trie) Insert(key Prefix, item Item) (inserted bool) {
	return trie.put(key, item, false)
}
169968
func (s Int64) Insert(items ...int64) {
	for _, item := range items {
		s[item] = Empty{}
	}
}
584249
func (s *nodeStack) insert(i int, n *Node) {
	(*s) = append(*s, nil)
	copy((*s)[i+1:], (*s)[i:])
	(*s)[i] = n
}
1017902
func (s IntSet) Insert(items ...int) {
	for _, item := range items {
		s[item] = sets.Empty{}
	}
}
689544
func (blink *blink) Insert(keys ...Key) Keys {
	if len(keys) > numberOfItemsBeforeMultithread {
		return blink.multithreadedInsert(keys)
	}
	overwritten := make(Keys, 0, len(keys))
	stack := make(nodes, 0, blink.ary)
	for _, k := range keys {
		overwritten = append(overwritten, blink.insert(k, &stack))
		stack.reset()
	}

	return overwritten
}
677281
func (p *PriorityQueue) Insert(v interface{}, priority float64) {
	_, ok := p.lookup[v]
	if ok {
		return
	}

	newItem := &item{
		value:    v,
		priority: priority,
	}
	heap.Push(p.itemHeap, newItem)
	p.lookup[v] = newItem
}
998382
func (l *List) insertValue(v *Node, at *Element) *Element {
	return l.insert(&Element{Value: v}, at)
}
7684
func (l *List) InsertAfter(b, e Element) {
	a := ElementMapper{}.linkerFor(b).Next()
	ElementMapper{}.linkerFor(e).SetNext(a)
	ElementMapper{}.linkerFor(e).SetPrev(b)
	ElementMapper{}.linkerFor(b).SetNext(e)

	if a != nil {
		ElementMapper{}.linkerFor(a).SetPrev(e)
	} else {
		l.tail = e
	}
}
1188109
func (t *TopK) insert(data []byte, freq uint64) {
	for i, element := range *t.elements {
		if bytes.Equal(data, element.Data) {
			// Element already in top-k, replace it with new frequency.
			heap.Remove(t.elements, i)
			element.Freq = freq
			heap.Push(t.elements, element)
			return
		}
	}

	if t.elements.Len() == int(t.k) {
		// Remove minimum-frequency element.
		heap.Pop(t.elements)
	}

	// Add element to top-k.
	heap.Push(t.elements, &Element{Data: data, Freq: freq})
}
1262897
func Insert(dst, src string, index int) string {
	return Slice(dst, 0, index) + src + Slice(dst, index, -1)
}
6904
func (list *List) Append(value Value) {
	list.values = append(list.values, value)
}
1120199
func (l *List) Insert(ptr RowPtr, row Row) {
	l.chunks[ptr.ChkIdx].Insert(int(ptr.RowIdx), row)
}