Documentation
¶
Index ¶
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func Map[T, R any](src []T, fn func(T) R) []R
- func MapEntries[M ~map[K]V, K comparable, V any, R any](m M, fn func(K, V) R) []R
- func MapKeys[M ~map[K]V, K comparable, V any, R any](m M, fn func(K) R) []R
- func Reduce[T, R any](src []T, init R, fn func(R, T) R) R
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapEntries ¶
func MapEntries[M ~map[K]V, K comparable, V any, R any](m M, fn func(K, V) R) []R
MapEntries 遍历完整键值对 k+v
func MapKeys ¶
func MapKeys[M ~map[K]V, K comparable, V any, R any](m M, fn func(K) R) []R
MapKeys 只遍历map key,对key做映射
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.