Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapFilter ¶
func MapFilter[K comparable, V any](m map[K]V, f func(V) bool) map[K]V
MapFilter returns a new map, containing only those values for which the filter function returns true.
func MapMapValues ¶
func MapMapValues[K comparable, V1, V2 any](m map[K]V1, f func(K, V1) V2) map[K]V2
MapMapValues applies a function to each value in a map, yielding a map with the new values (and type).
func MapMax ¶
func MapMax[K comparable, V constraints.Ordered](m map[K]V) V
MapMax returns the maximum value from a map.
func Sum ¶
func Sum[K comparable, V1 any, V2 constraints.Integer | constraints.Float | constraints.Complex](m map[K]V1, f func(V1) V2) V2
Sum returns the sum of values the function returns from a map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.