collections

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStackEmpty = errors.New("cannot pop from an empty stack")

Functions

This section is empty.

Types

type Stack

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

func NewStack

func NewStack[T any]() *Stack[T]

func (*Stack[T]) Len

func (stack *Stack[T]) Len() int

func (*Stack[T]) Pop

func (stack *Stack[T]) Pop() (T, error)

func (*Stack[T]) Push

func (stack *Stack[T]) Push(els ...T)

Jump to

Keyboard shortcuts

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