Documentation
¶
Overview ¶
Package deque provides a slice-backed double-ended queue.
Index ¶
- type Deque
- func (d Deque[Elem]) Append(ee ...Elem) Deque[Elem]
- func (d Deque[Elem]) DropEnd(n int) Deque[Elem]
- func (d Deque[Elem]) DropEndWhile(pred func(Elem) bool) Deque[Elem]
- func (d Deque[Elem]) GrowEnd(n int) Deque[Elem]
- func (d Deque[Elem]) GrowFront(n int) Deque[Elem]
- func (d Deque[Elem]) Len() int
- func (d Deque[Elem]) Prepend(ee ...Elem) Deque[Elem]
- func (d Deque[Elem]) Reset() Deque[Elem]
- func (d Deque[Elem]) Slice() []Elem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deque ¶
type Deque[Elem any] struct { // contains filtered or unexported fields }
Deque is a slice-backed double-ended queue.
func (Deque[Elem]) DropEnd ¶
DropEnd removes n elements from the end of the deque. If n is negative, there is no change. If n is larger than the deque's size, the result is empty.
func (Deque[Elem]) DropEndWhile ¶
DropEndWhile removes elements from the end of the deque until the predicate returns false. The pointer passed to the predicate is a view into the deque's memory.
Click to show internal directories.
Click to hide internal directories.