Initial commit of modash
This was taken from github.com/lmika/gopkgs/fp
This commit is contained in:
commit
a20530ddfd
20 changed files with 425 additions and 0 deletions
9
momap/keys.go
Normal file
9
momap/keys.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package momap
|
||||
|
||||
func Keys[K comparable, V any](m map[K]V) []K {
|
||||
ks := make([]K, 0, len(m))
|
||||
for k := range m {
|
||||
ks = append(ks, k)
|
||||
}
|
||||
return ks
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue