doublelist

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: CC0-1.0 Imports: 0 Imported by: 0

Documentation

Overview

Package doublelist implements a doubly-linked list. It is not a complete implementation, and instead of implements the bare minimum functionality required by upstream cache consumers.

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 (*List[T]) Append

func (l *List[T]) Append(v T) *Node[T]

func (*List[T]) Head

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

func (*List[T]) Pop

func (l *List[T]) Pop(n *Node[T])

func (*List[T]) PopTail

func (l *List[T]) PopTail() (*Node[T], bool)

func (*List[T]) Prepend

func (l *List[T]) Prepend(v T) *Node[T]

func (*List[T]) Tail

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

type Node

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

Jump to

Keyboard shortcuts

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