// 简化map操作
package datastruct

func GetKeys[K comparable, V any](mapKv map[K]V) []K {
	keys := make([]K, 0, len(mapKv))
	for k := range mapKv {
		keys = append(keys, k)
	}
	return keys
}

func GetVals[K comparable, V any](mapKv map[K]V) []V {
	vals := make([]V, 0, len(mapKv))
	for _, v := range mapKv {
		vals = append(vals, v)
	}
	return vals
}
