Compare commits

...

1 Commits

Author SHA1 Message Date
2f66ab1cf0 v0.0.105 2023-04-23 19:31:48 +02:00

View File

@@ -15,3 +15,11 @@ func ArrToMap[T comparable, V any](a []V, keyfunc func(V) T) map[T]V {
}
return result
}
func CopyMap[K comparable, V any](a map[K]V) map[K]V {
result := make(map[K]V, len(a))
for k, v := range a {
result[k] = v
}
return result
}