Documentation
¶
Index ¶
- Variables
- type LinkedList
- func (ll *LinkedList[T]) AppendSeq(seq iter.Seq[T])
- func (ll LinkedList[T]) Back() (ret T, err error)
- func (ll *LinkedList[T]) Backward() func(yield func(T) bool)
- func (ll *LinkedList[T]) Clear()
- func (ll LinkedList[T]) Front() (ret T, err error)
- func (ll LinkedList[T]) IsEmpty() bool
- func (ll *LinkedList[T]) PopBack() error
- func (ll *LinkedList[T]) PopFront() error
- func (ll *LinkedList[T]) PushBack(val T)
- func (ll *LinkedList[T]) PushFront(val T)
- func (ll LinkedList[T]) Size() int
- func (ll *LinkedList[T]) Values() func(yield func(T) bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmpty = errors.New("linked list is empty") ErrPopEmpty = errors.New("trying to pop an empty linked list") )
Functions ¶
This section is empty.
Types ¶
type LinkedList ¶
type LinkedList[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]() LinkedList[T]
func (*LinkedList[T]) AppendSeq ¶
func (ll *LinkedList[T]) AppendSeq(seq iter.Seq[T])
func (LinkedList[T]) Back ¶
func (ll LinkedList[T]) Back() (ret T, err error)
func (*LinkedList[T]) Backward ¶
func (ll *LinkedList[T]) Backward() func(yield func(T) bool)
func (*LinkedList[T]) Clear ¶
func (ll *LinkedList[T]) Clear()
func (LinkedList[T]) Front ¶
func (ll LinkedList[T]) Front() (ret T, err error)
func (LinkedList[T]) IsEmpty ¶
func (ll LinkedList[T]) IsEmpty() bool
func (*LinkedList[T]) PopBack ¶
func (ll *LinkedList[T]) PopBack() error
func (*LinkedList[T]) PopFront ¶
func (ll *LinkedList[T]) PopFront() error
func (*LinkedList[T]) PushBack ¶
func (ll *LinkedList[T]) PushBack(val T)
func (*LinkedList[T]) PushFront ¶
func (ll *LinkedList[T]) PushFront(val T)
func (LinkedList[T]) Size ¶
func (ll LinkedList[T]) Size() int
func (*LinkedList[T]) Values ¶
func (ll *LinkedList[T]) Values() func(yield func(T) bool)
Iterations
Click to show internal directories.
Click to hide internal directories.