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.
Click to show internal directories.
Click to hide internal directories.