list

package
v0.0.0-...-c183f35 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 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 struct {
	// contains filtered or unexported fields
}

Stack represents a stack.

func NewStack

func NewStack() *Stack

NewStack returns a new stack instance.

func (*Stack) Empty

func (s *Stack) Empty() bool

Empty checks if the stack is empty or not.

func (*Stack) Pop

func (s *Stack) Pop() ds.Comparable

Pop removes the top element from the stack.

func (*Stack) Push

func (s *Stack) Push(c ds.Comparable)

Push adds an element to the top of the stack.

func (*Stack) Top

func (s *Stack) Top() ds.Comparable

Top returns the top element from the stack.

Jump to

Keyboard shortcuts

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