stack

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT 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

Stack is a FILO stack

func New added in v1.8.0

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

New returns a new stack

func (*Stack[T]) Pop

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

Pop pops the top value out of the stack

func (*Stack[T]) Push

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

Push pushes a value to the stack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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