Documentation ¶
Overview ¶
Package genmap provides generic functions for manipulating maps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapValues ¶ added in v6.3.0
func MapValues[K comparable, V any](m map[K]V) []V
MapValues constructs a list of all values of the map in a non-deterministic order. NOTE: when used in the protocol functions, the values must be sorted.
func Pick ¶
func Pick[K comparable, V any](m map[K]V, keys []K) map[K]V
Pick creates a new map based on `m` by selecting entries from `keys`. If a key is in keys, but not map, then it's not included. Map keys and values are copied.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.