stack

package
v0.0.0-...-1f982ba Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyStack = errors.New("cannot perform operation from empty stack")

Functions

This section is empty.

Types

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func New

func New() Stack

func (*Stack) Length

func (s *Stack) Length() int

func (*Stack) Peek

func (s *Stack) Peek() (interface{}, error)

func (*Stack) Pop

func (s *Stack) Pop() (interface{}, error)

func (*Stack) Push

func (s *Stack) Push(val interface{})

Jump to

Keyboard shortcuts

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