stack

package
v0.0.6-alpha-312cf35 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyStack = errors.New("empty Stack")

Functions

This section is empty.

Types

type AsyncStack

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

func NewAsyncStack

func NewAsyncStack[T any]() *AsyncStack[T]

func (*AsyncStack[T]) Empty

func (st *AsyncStack[T]) Empty() bool

func (*AsyncStack[T]) Pop

func (st *AsyncStack[T]) Pop() (T, error)

func (*AsyncStack[T]) Push

func (st *AsyncStack[T]) Push(value T)

func (*AsyncStack[T]) Top

func (st *AsyncStack[T]) Top() (T, error)

type Stack

type Stack[T any] []T

func NewStack

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

func (*Stack[T]) Empty

func (st *Stack[T]) Empty() bool

func (*Stack[T]) Pop

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

func (*Stack[T]) Push

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

func (*Stack[T]) Top

func (st *Stack[T]) Top() (T, error)

Jump to

Keyboard shortcuts

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