// Pop removed the item from the set and returns true if it was there.
//
// Returns false if this item has been popped before (perhaps in another
// transaction), or it's not in the the listing passed to BeginPop.
325087
func (p *PopOp) Pop(id string) bool {
	if p.finished {
		panic("the operation has already been finished")
	}
	if !p.CanPop(id) {
		return false
	}
	p.tombs[id] = p.now
	p.popped = append(p.popped, &tombstone{
		id:      id,
		storage: p.idToKeys[id],
	})
	p.dirty = true
	return true
}
45109
func (rs *Set) Pop() (string, error) {
	conn := rs.pool.Get(rs.dbindex)
	result, err := conn.Do("SPOP", rs.id)
	if err != nil {
		panic(err)
	}
	return redis.String(result, err)
}
381150
func (s *SuiteStack) Pop() *Suite {
	if s.count == 0 {
		return nil
	}
	s.count--
	return s.nodes[s.count]
}
851811
func (p *PopOp) CanPop(id string) bool {
	if _, hasTomb := p.tombs[id]; hasTomb {
		return false // already popped by someone else
	}
	if _, present := p.idToKeys[id]; present {
		return true // listed in the set
	}
	return false
}
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
}
1052951
func Pop(queue Queue) interface{} {
	var result interface{}
	queue.Pop(func(obj interface{}) error {
		result = obj
		return nil
	})
	return result
}
1078226
func (s *LIFO) Pop() (T, bool) {
	if s.top == nil {
		return nil, false
	}
	node := s.top
	s.top = node.next
	s.size--
	return node.v, true
}
1162269
func (h *Float64s) Pop() float64 {
	if h.less == nil {
		PopToLastF(len(h.list), h.list.Less, h.list.Swap)
	} else {
		PopToLastF(len(h.list), h.less, h.list.Swap)
	}

	res := h.list[len(h.list)-1]
	h.list = h.list[:len(h.list)-1]

	return res
}
1132731
func (rb *ringBuffer) Pop() (interface{}, bool) {
	if rb.start.used == false {
		return nil, false
	}
	value := rb.start.value
	rb.start.used = false
	rb.start.value = nil
	rb.start = rb.start.next
	return value, true
}
77970
func (db *RedisDB) Pop(k string) (string, error) {
	db.master.Lock()
	defer db.master.Unlock()

	if !db.exists(k) {
		return "", ErrKeyNotFound
	}
	if db.t(k) != "list" {
		return "", ErrWrongType
	}

	return db.listPop(k), nil
}
472965
func (q *Queue) Pop() (interface{}, error) {
	q.Lock()
	defer q.Unlock()
	return q.pop()
}
1177634
func (h *interfaces) Pop() interface{} {
	PopToLastF(len(h.list), h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] })

	res := h.list[len(h.list)-1]
	h.list[len(h.list)-1] = nil // remove the reference in h.list
	h.list = h.list[:len(h.list)-1]

	return res
}
864861
func (s *Stack) Pop() interface{} {
	if s.size > 0 {
		value := s.top.value
		s.top = s.top.next
		s.size--
		return value
	}
	return nil
}
1288257
func (s *sstack) Pop() (res interface{}) {
	s.size--
	s.offset--
	if s.offset < 0 {
		s.offset = blockSize - 1
		s.active = s.blocks[s.size/blockSize]
	}
	res, s.active[s.offset] = s.active[s.offset], nil
	if s.setIndex != nil {
		s.setIndex(res.(*item).value, -1)
	}
	return
}
990898
func (s *Stack) Pop() (elem interface{}) {
	if s.size == 0 {
		return nil
	}

	s.offset--
	s.size--

	if s.offset < 0 {
		s.offset = s.pageSize - 1

		s.currentPage, s.pages = s.pages[s.currentPageIndex-1], s.pages[:s.currentPageIndex+1]
		s.capacity -= s.pageSize
		s.currentPageIndex--
	}

	elem = s.currentPage[s.offset]

	return
}
112103
func (s *parentStack) Pop() *treapNode {
	if s.index == 0 {
		return nil
	}

	s.index--
	if s.index < staticDepth {
		node := s.items[s.index]
		s.items[s.index] = nil
		return node
	}

	node := s.overflow[s.index-staticDepth]
	s.overflow[s.index-staticDepth] = nil
	return node
}
391917
func (p *PortList) Pop() string {
	if len(*p) == 0 {
		panic("list is empty")
	}
	val := (*p)[len(*p)-1]
	*p = (*p)[:len(*p)-1]
	return val
}