generic

package
v0.0.0-...-f92c3b3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 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 Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T comparable]() Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(items ...T)

func (*Set[T]) Delete

func (s *Set[T]) Delete(items ...T)

func (*Set[T]) Has

func (s *Set[T]) Has(item T) bool

type Stack

type Stack[T any] struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack[T any](capacity int) Stack[T]

func (*Stack[T]) Peek

func (stack *Stack[T]) Peek() (result T)

func (*Stack[T]) Pop

func (stack *Stack[T]) Pop() (result T)

func (*Stack[T]) Push

func (stack *Stack[T]) Push(item T)

Jump to

Keyboard shortcuts

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