Documentation
¶
Index ¶
- type Double
- func (dl *Double[T]) Append(val T) DoubleID[T]
- func (dl *Double[T]) Forward() iter.Seq[T]
- func (dl *Double[T]) Head() T
- func (dl *Double[T]) Len() int
- func (dl *Double[T]) Prepend(val T) DoubleID[T]
- func (dl *Double[T]) Remove(val T, cmp func(a, b T) bool)
- func (dl *Double[T]) RemoveItem(id DoubleID[T])
- func (dl *Double[T]) RemoveReverse(val T, cmp func(a, b T) bool)
- func (dl *Double[T]) Reset()
- func (dl *Double[T]) Reverse() iter.Seq[T]
- func (dl *Double[T]) Tail() T
- type DoubleID
- type Single
- func (sl *Single[T]) Append(val T) SingleID[T]
- func (sl *Single[T]) Forward() iter.Seq[T]
- func (sl *Single[T]) Head() T
- func (sl *Single[T]) Len() int
- func (sl *Single[T]) Prepend(val T) SingleID[T]
- func (sl *Single[T]) Remove(val T, cmp func(a, b T) bool)
- func (sl *Single[T]) RemoveItem(id SingleID[T])
- func (sl *Single[T]) Reset()
- type SingleID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Double ¶
type Double[T any] struct { // contains filtered or unexported fields }
Double provides a doubly linked list.
func (*Double[T]) RemoveItem ¶
func (*Double[T]) RemoveReverse ¶
type Single ¶
type Single[T any] struct { // contains filtered or unexported fields }
Single provides a singly linked list.
func (*Single[T]) Prepend ¶
Prepend adds a new item to the beginning of the list and returns its ID.
func (*Single[T]) Remove ¶
Remove removes the first occurrence of the specified value from the list.
func (*Single[T]) RemoveItem ¶
RemoveItem removes the item with the specified ID from the list.
Click to show internal directories.
Click to hide internal directories.