maps

package
v0.0.0-...-98c81bf Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat[K comparable, V any](maps ...map[K]V) map[K]V

Concatenate the maps given

func Equals

func Equals[K cmp.Ordered, V cmp.Ordered](m1 map[K]V, m2 map[K]V) bool

Return true if the maps given are equal, else false. O(nlogn)

func HasKey

func HasKey[K comparable, V any](m map[K]V, key K) bool

Return true if the key given is in the map given. Else, false.

func HasOneKeyType

func HasOneKeyType[K comparable, V any](m map[K]V) bool

func Keys

func Keys[K comparable, V any](m map[K]V) []K

Return keys of the map given

func SortByKeys

func SortByKeys[K cmp.Ordered, V any](m map[K]V) map[K]V

Sort the map given by its keys

func SortedKeys

func SortedKeys[K cmp.Ordered, V any](m map[K]V) []K

Return a sorted array of keys from the map given

func SortedValues

func SortedValues[K comparable, V cmp.Ordered](m map[K]V) []V

Return a sorted array of values from the map given

func Values

func Values[K comparable, V any](m map[K]V) []V

Return values of the map given

Types

This section is empty.

Jump to

Keyboard shortcuts

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