Skip to content

Commit

Permalink
Update map.go
Browse files Browse the repository at this point in the history
  • Loading branch information
samber authored Jul 29, 2024
1 parent 2642e6d commit 954ebe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func Keys[K comparable, V any](in ...map[K]V) []K {
}

// UniqKeys creates an array of unique keys in the map.
// Play: https://go.dev/play/p/RyIE6Pb5dVS
// Play: https://go.dev/play/p/TPKAb6ILdHk
func UniqKeys[K comparable, V any](in ...map[K]V) []K {
seen := make(map[K]struct{})
result := make([]K, 0)
Expand Down Expand Up @@ -55,7 +55,7 @@ func Values[K comparable, V any](in ...map[K]V) []V {
}

// UniqValues creates an array of unique values in the map.
// Play: https://go.dev/play/p/RxsJbnaJn3I
// Play: https://go.dev/play/p/nf6bXMh7rM3
func UniqValues[K comparable, V comparable](in ...map[K]V) []V {
seen := make(map[V]struct{})
result := make([]V, 0)
Expand Down

0 comments on commit 954ebe8

Please sign in to comment.