linkedlist

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-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 LinkedElement

type LinkedElement struct {
	Prev  gotypes.E
	Value gotypes.E
	Next  gotypes.E
}

Define LinkedElement struct

type LinkedList

type LinkedList struct {
	// contains filtered or unexported fields
}

Define LinkedList struct

func New added in v0.1.1

func New() *LinkedList

Create new LinkedList

func (*LinkedList) Add

func (l *LinkedList) Add(e gotypes.E) *LinkedList

Add element into tail

func (*LinkedList) Clear

func (l *LinkedList) Clear()

Clear List

func (*LinkedList) Count

func (l *LinkedList) Count(matchFunc matchFunc) int

Count function

func (*LinkedList) Filter

func (l *LinkedList) Filter(matchFunc matchFunc) *LinkedList

Filter function

func (*LinkedList) ForEach

func (l *LinkedList) ForEach(eachFunc eachFunc)

ForEach function

func (*LinkedList) Head

func (l *LinkedList) Head() LinkedElement

Return first element

func (*LinkedList) Map

func (l *LinkedList) Map(mapFunc mapFunc) *LinkedList

Map function

func (*LinkedList) MatchAll

func (l *LinkedList) MatchAll(matchFunc matchFunc) bool

MatchAll function

func (*LinkedList) MatchAny

func (l *LinkedList) MatchAny(matchFunc matchFunc) bool

MatchAny function

func (*LinkedList) MatchNone

func (l *LinkedList) MatchNone(matchFunc matchFunc) bool

MatchNone function

func (*LinkedList) Peek

func (l *LinkedList) Peek() LinkedElement

Return tail and remove it

func (*LinkedList) Reduce

func (l *LinkedList) Reduce(val gotypes.E, reduceFunc reduceFunc) gotypes.E

Reduce function

func (*LinkedList) Size

func (l *LinkedList) Size() int

Return List size

func (*LinkedList) Tail

func (l *LinkedList) Tail() LinkedElement

Return last element

func (*LinkedList) Take

func (l *LinkedList) Take() LinkedElement

Return head and remove it

Jump to

Keyboard shortcuts

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