Documentation ¶
Overview ¶
Package list is the standard library's 'container/list', but using Generics for performance.
Index ¶
- type Element
- type List
- func (l *List[T]) Back() *Element[T]
- func (l *List[T]) Front() *Element[T]
- func (l *List[T]) Init() *List[T]
- func (l *List[T]) Len() int
- func (l *List[T]) PushBack(v T) *Element[T]
- func (l *List[T]) PushBackValue(v *Element[T])
- func (l *List[T]) PushFront(v T) *Element[T]
- func (l *List[T]) PushFrontValue(v *Element[T])
- func (l *List[T]) Remove(e *Element[T])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element[T any] struct { // The value stored with this element. Value T // contains filtered or unexported fields }
Element is an element of a linked list.
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
List represents a doubly linked list. The zero value for List is an empty list ready to use.
func (*List[T]) PushBack ¶
PushBack inserts a new element e with value v at the back of list l and returns e.
func (*List[T]) PushBackValue ¶
func (*List[T]) PushFront ¶
PushFront inserts a new element e with value v at the front of list l and returns e.
func (*List[T]) PushFrontValue ¶
Click to show internal directories.
Click to hide internal directories.