stack

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 2 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[A any] struct {
	Items []A
}

func Empty

func Empty[A any]() *Stack[A]

func FromIterator

func FromIterator[A any](initialElements iterable.Iterable[A]) *Stack[A]

func FromSlice

func FromSlice[A any](initialElements []A) *Stack[A]

func (*Stack[A]) Iterator

func (s *Stack[A]) Iterator() iterable.Iterator[A]

func (*Stack[A]) Peek

func (s *Stack[A]) Peek() *A

func (*Stack[A]) Pop

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

func (*Stack[A]) Push

func (s *Stack[A]) Push(a A)

Jump to

Keyboard shortcuts

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