MCPcopy Create free account
hub / github.com/eth-easl/dirigent / Keys

Function Keys

pkg/map/maps.go:27–35  ·  view source on GitHub ↗
(m M)

Source from the content-addressed store, hash-verified

25package _map
26
27func Keys[M ~map[K]V, K comparable, V any](m M) []K {
28 r := make([]K, 0, len(m))
29
30 for k := range m {
31 r = append(r, k)
32 }
33
34 return r
35}
36
37func Values[M ~map[K]V, K comparable, V any](m M) []V {
38 r := make([]V, 0, len(m))

Callers 1

TestKeysValuesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestKeysValuesFunction · 0.68