stack

package
v0.21.18 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: GPL-3.0 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 interface {
	// push a data into stack
	Push(v interface{})
	// pop last data
	Pop() (interface{}, bool)
	// pop many of data
	PopMany(count int64) ([]interface{}, bool)
	// pop all data
	PopAll() ([]interface{}, bool)
	// peek last data
	Peek() (interface{}, bool)
	// get length of stack
	Length() int64
	// judge stack's lenght if 0
	IsEmpty() bool
}

Stack functions for manager datas in stack

func New

func New() Stack

New get stack functions manager

Jump to

Keyboard shortcuts

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