refactor variable system to be the responsibility of effect enforcer.
This commit is contained in:
@@ -14,3 +14,12 @@ func OneItemMap[K comparable, V any](key K, value V) map[K]V {
|
||||
m[key] = value
|
||||
return m
|
||||
}
|
||||
|
||||
func MapKeys[K comparable, V any](m map[K]V) []K {
|
||||
keys := make([]K, 0, len(m))
|
||||
for key := range m {
|
||||
keys = append(keys, key)
|
||||
}
|
||||
|
||||
return keys
|
||||
}
|
||||
Reference in New Issue
Block a user