// Pop returns the head of the heap and removes it.
423681
func (h *Heap) Pop() (interface{}, error) {
	obj := heap.Pop(h.data)
	if obj != nil {
		if h.metricRecorder != nil {
			h.metricRecorder.Dec()
		}
		return obj, nil
	}
	return nil, fmt.Errorf("object was removed from heap data")
}
631017
func (s *Stack) Pop() string {
	if len(*s) == 0 {
		return ""
	}
	top := s.Peek()
	*s = (*s)[0 : len(*s)-1]
	return top
}
664732
func (s *Deque) Pop() interface{} {
	s.Lock()
	defer s.Unlock()

	var item interface{} = nil
	var lastContainerItem *list.Element = nil

	lastContainerItem = s.container.Back()
	if lastContainerItem != nil {
		item = s.container.Remove(lastContainerItem)
	}

	return item
}
44311
func (s *Stack) Pop() (interface{}, bool) {
	if s.values.Len() == 0 {
		return nil, false
	}

	e := s.values.Back()
	return s.values.Remove(e), true
}
824585
func (v *autoEscapeVisitor) pop() {
	v.stack = v.stack[0 : len(v.stack)-1]
}
204395
func (s *set) Pop() interface{} {
	for item := range s.m {
		delete(s.m, item)
		return item
	}
	return nil
}
758579
func (list *List) Pop() string {
	if list.length == 0 {
		return ""
	}
	if list.length == 1 {
		s := list.first.Content
		list.first = nil
		list.last = nil
		list.length--
		return s
	}
	s := list.last.Content
	var prev *ListItem
	tmp := list.first
	for i := 0; i < list.length; i++ {
		if i == list.length-2 {
			prev = tmp
			break
		} else {
			tmp = tmp.Next
		}
	}
	prev.Next = nil
	list.length--
	return s
}
823162
func (ps *PointSet) Pop() *Point {
	deref := *ps
	if len(deref) == 0 {
		return nil
	}

	x := deref[len(deref)-1]
	*ps = deref[:len(deref)-1]

	return &x
}
443217
func (p *PendingEvaluations) Pop() interface{} {
	n := len(*p)
	e := (*p)[n-1]
	(*p)[n-1] = nil
	*p = (*p)[:n-1]
	return e
}
1304031
func (pq *txPriorityQueue) Pop() interface{} {
	n := len(pq.items)
	item := pq.items[n-1]
	pq.items[n-1] = nil
	pq.items = pq.items[0 : n-1]
	return item
}
284260
func (s *children) pop() (out *node) {
	index := len(*s) - 1
	out = (*s)[index]
	(*s)[index] = nil
	*s = (*s)[:index]
	return
}
88540
func (s *ListStack) Pop() (interface{}, error) {
	if s.IsEmpty() {
		return nil, errors.New("unable to pop element, stack is empty")
	}
	item := s.first.item
	s.first = s.first.next
	s.size--
	return item, nil
}
447722
func (s *items) pop() (out Item) {
	index := len(*s) - 1
	out = (*s)[index]
	(*s)[index] = nil
	*s = (*s)[:index]
	return
}
570397
func (s *Stack) Pop() (*Item, error) {
	s.Lock()
	defer s.Unlock()

	// Check if stack is closed.
	if !s.isOpen {
		return nil, ErrDBClosed
	}

	// Try to get the next item in the stack.
	item, err := s.getItemByID(s.head)
	if err != nil {
		return nil, err
	}

	// Remove this item from the stack.
	if err := s.db.Delete(item.Key, nil); err != nil {
		return nil, err
	}

	// Decrement head position.
	s.head--

	return item, nil
}
282084
func (s *sccAcct) pop() Node {
	n := len(s.Stack)
	if n == 0 {
		return nil
	}
	node := s.Stack[n-1]
	s.Stack = s.Stack[:n-1]
	return node
}
389654
func (p *Pairs) Pop() interface{} {
	old := *p
	n := len(old)
	x := old[n-1]
	*p = old[0 : n-1]
	return x
}
459232
func (c *configuration) pop() head {
	retVal := c.stack[len(c.stack)-1]
	c.stack = c.stack[0 : len(c.stack)-1]
	return retVal
}