Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator[T any] struct { // contains filtered or unexported fields }
Iterator is an iterator over the elements in a List.
func (*Iterator[T]) Get ¶
func (it *Iterator[T]) Get() T
Get returns the element at the current position.
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
List is a lock-free singly linked list. It is safe to use it concurrently from multiple goroutines. The zero value is ready to use. Do not copy a non-zero List.
func NewFromIterable ¶ added in v1.6.1
NewFromIterable creates a List from the specified iter.Iterable in reverse order. List.Reverse can be used to restore the original order.
func (*List[T]) Prepend ¶
func (list *List[T]) Prepend(value T)
Prepend adds the specified value to the beginning of the List.
Click to show internal directories.
Click to hide internal directories.