stack

package
v0.0.0-...-2bc3700 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack[T any] []T

func NewStackWithCapacity

func NewStackWithCapacity[T any](capacity uint) Stack[T]

func (*Stack[T]) DropTop

func (s *Stack[T]) DropTop(n uint) []T

func (*Stack[T]) Empty

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

func (*Stack[T]) Peek

func (s *Stack[T]) Peek() (v T, ok bool)

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() T

func (*Stack[T]) Push

func (s *Stack[T]) Push(elem T)

func (*Stack[T]) SliceTop

func (s *Stack[T]) SliceTop(n uint) []T

func (*Stack[T]) TryPop

func (s *Stack[T]) TryPop() (v T, ok bool)

Jump to

Keyboard shortcuts

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