Help us shape the future of Go! Take the 2026 Go Developer Survey

maps

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyToAllKeys

func ApplyToAllKeys[M ~map[K1]V, K1, K2 comparable, V any](m M, f func(K1) K2) map[K2]V

ApplyToAllKeys returns a new map containing the results of applying the function `f` to each key of the original map `m`.

func ApplyToAllValues

func ApplyToAllValues[M ~map[K]V1, K comparable, V1, V2 any](m M, f func(V1) V2) map[K]V2

ApplyToAllValues returns a new map containing the results of applying the function `f` to each value of the original map `m`.

func Keys

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

Keys returns the keys of the map `m`. The keys will be in an indeterminate order.

func Values

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

Values returns the values of the map `m`. The values will be in an indeterminate order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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