Documentation
¶
Index ¶
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func Max[T Ordered](item T, items ...T) T
- func Min[T Ordered](item T, items ...T) T
- func SliceContain[T comparable](arr []T, target T) bool
- func SliceEqual[T comparable](a, b []T) bool
- func SliceToCountMap[T comparable](arr []T) map[T]int
- func SliceToMap[T comparable](arr []T) map[T]struct{}
- func Values[M ~map[K]V, K comparable, V any](m M) []V
- type Ordered
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keys ¶
func Keys[M ~map[K]V, K comparable, V any](m M) []K
func SliceContain ¶
func SliceContain[T comparable](arr []T, target T) bool
func SliceEqual ¶
func SliceEqual[T comparable](a, b []T) bool
func SliceToCountMap ¶
func SliceToCountMap[T comparable](arr []T) map[T]int
func SliceToMap ¶
func SliceToMap[T comparable](arr []T) map[T]struct{}
func Values ¶
func Values[M ~map[K]V, K comparable, V any](m M) []V
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
Set is a simple, non-concurrent-safe set.
Click to show internal directories.
Click to hide internal directories.