stack

package
v0.0.0-...-987fb27 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 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)
	// PopMany pop many of data
	PopMany(count int64) ([]interface{}, bool)
	// PopAll pop all data
	PopAll() ([]interface{}, bool)
	// Peek last data
	Peek() (interface{}, bool)
	// Length get length of stack
	Length() int64
	// IsEmpty judge stack's length 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