stack

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-2.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 struct {
	// contains filtered or unexported fields
}

Define Stack struct

func NewStack

func NewStack() *Stack

create new empty Stack

func (*Stack) Clear

func (stack *Stack) Clear()

clear stack

func (*Stack) Filter

func (stack *Stack) Filter(filterFn func(e *gotypes.Element) bool) *Stack

filter function

func (*Stack) ForEach

func (stack *Stack) ForEach(fn func(e *gotypes.Element))

foreach function

func (*Stack) Map

func (stack *Stack) Map(mapFn func(e *gotypes.Element) gotypes.Element) *Stack

map function

func (*Stack) MatchAll

func (stack *Stack) MatchAll(matchAllFn func(e *gotypes.Element) bool) bool

matchAll function

func (*Stack) MatchAny

func (stack *Stack) MatchAny(matchAnyFn func(e *gotypes.Element) bool) bool

matchAny function

func (*Stack) MatchNone

func (stack *Stack) MatchNone(matchNoneFn func(e *gotypes.Element) bool) bool

matchNone function

func (*Stack) Pop

func (stack *Stack) Pop() *gotypes.Element

pop first element

func (*Stack) Push

func (stack *Stack) Push(e gotypes.Element) *Stack

push element into bottom

func (*Stack) Reduce

func (stack *Stack) Reduce(val gotypes.Element, reduceFn func(val gotypes.Element, e *gotypes.Element) gotypes.Element) gotypes.Element

reduce function

func (*Stack) Size

func (stack *Stack) Size() int

return stack size

Jump to

Keyboard shortcuts

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