containers

package
v0.166.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 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 (*Stack[T]) IsEmpty

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

IsEmpty check if stack is empty

func (*Stack[T]) Last

func (s *Stack[T]) Last() (T, bool)

Last returns the last stack element

func (*Stack[T]) Pop

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

Pop remove and return top element of stack. Return false if stack is empty.

func (*Stack[T]) Push

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

Push a new value onto the stack

Jump to

Keyboard shortcuts

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