list

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT, Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any]() *List[T]

func (*List[T]) First

func (l *List[T]) First() (T, bool)

func (*List[T]) Head

func (l *List[T]) Head() *Node[T]

func (*List[T]) Last

func (l *List[T]) Last() (T, bool)

func (*List[T]) Len

func (l *List[T]) Len() uint

func (*List[T]) Pop

func (l *List[T]) Pop() (T, bool)

func (*List[T]) Push

func (l *List[T]) Push(v T)

func (*List[T]) PushAt added in v0.3.0

func (l *List[T]) PushAt(idx int, v T)

func (*List[T]) PushFront added in v0.2.0

func (l *List[T]) PushFront(v T)

func (*List[T]) Tail

func (l *List[T]) Tail() *Node[T]

type ListIface added in v0.2.0

type ListIface[T any] interface {
	First() (T, bool)
	Last() (T, bool)
	Pop() (T, bool)
	Push(v T)
	Len() uint
}

type Node

type Node[T any] struct {
	Value T
	Next  *Node[T]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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