counter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter[A comparable] struct {
	Counts map[A]int
}

func NewCounter

func NewCounter[A comparable]() *Counter[A]

func (*Counter[A]) Add

func (c *Counter[A]) Add(a A) int

func (*Counter[A]) Get

func (c *Counter[A]) Get(a A) int

func (*Counter[A]) Remove

func (c *Counter[A]) Remove(a A) bool

Jump to

Keyboard shortcuts

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