internal

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 1 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 []interface{}

Stack implementation used internally.

func (*Stack) IsEmpty

func (s *Stack) IsEmpty() bool

IsEmpty returns true if the stack is empty, false otherwise.

func (*Stack) Peek

func (s *Stack) Peek() (interface{}, error)

Peek returns the top element of the stack. Returns an error if the stack is empty.

func (*Stack) Pop

func (s *Stack) Pop() (interface{}, error)

Pop removes and returns the top element of the stack. Returns an error if the stack is empty.

func (*Stack) Push

func (s *Stack) Push(element interface{})

Push element into the stack.

func (*Stack) Size

func (s *Stack) Size() int

Size returns the number of elements in the Stack.

Jump to

Keyboard shortcuts

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