array

package
v0.0.0-...-6deb688 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyStack = errors.New("stack is empty")

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]) Count

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

func (*Stack[T]) Peek

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

func (*Stack[T]) Pop

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

func (*Stack[T]) Push

func (stack *Stack[T]) Push(value T)

Jump to

Keyboard shortcuts

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