linked_list

package
v0.0.0-...-fa3f174 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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 Collect

func Collect[T any](seq iter.Seq[T]) LinkedList[T]

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL